Skip to content

Commit 095bb5a

Browse files
committed
docs: Fix broken links and improve CI workflows
Link fixes: - Fix relative path in command_line_options.md (../../ -> ../) - Add gstreamer.freedesktop.org to excludes (flaky network) check-links.yml improvements: - Pin lychee to v0.22.0 - Only check docs/en/** (skip stale translations) - Add path exclusions for translated folders - Add lychee result caching (3-day expiry) pr-checks.yml fix: - Use unique heredoc delimiters to prevent conflicts with PR body content (fixes failures on Dependabot PRs containing "EOF")
1 parent f40cd47 commit 095bb5a

4 files changed

Lines changed: 28 additions & 23 deletions

File tree

.github/workflows/check-links.yml

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,18 @@ on:
55
branches:
66
- master
77
paths:
8-
- 'docs/**'
98
- '**.md'
9+
- '.lychee.toml'
10+
- '!docs/ko/**'
11+
- '!docs/tr/**'
12+
- '!docs/zh/**'
1013
pull_request:
1114
paths:
12-
- 'docs/**'
1315
- '**.md'
16+
- '.lychee.toml'
17+
- '!docs/ko/**'
18+
- '!docs/tr/**'
19+
- '!docs/zh/**'
1420
workflow_dispatch:
1521

1622
concurrency:
@@ -30,28 +36,26 @@ jobs:
3036
- name: Checkout
3137
uses: actions/checkout@v6
3238

39+
- name: Restore lychee cache
40+
uses: actions/cache@v5
41+
with:
42+
path: .lycheecache
43+
key: cache-lychee-${{ github.sha }}
44+
restore-keys: cache-lychee-
45+
3346
- name: Check links
3447
uses: lycheeverse/lychee-action@v2
3548
with:
36-
# Config in .lychee.toml, files to check passed as args
37-
args: '**/*.md docs/**'
49+
args: '--cache --max-cache-age 3d --no-progress **/*.md docs/en/**'
50+
lycheeVersion: v0.22.0
51+
failIfEmpty: false
3852
fail: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
3953

40-
- name: Add to step summary
41-
if: always()
42-
run: |
43-
echo "## 🔗 Link Check Results" >> "$GITHUB_STEP_SUMMARY"
44-
echo "" >> "$GITHUB_STEP_SUMMARY"
45-
if [[ -f ./lychee/out.md ]]; then
46-
cat ./lychee/out.md >> "$GITHUB_STEP_SUMMARY"
47-
else
48-
echo "No report generated" >> "$GITHUB_STEP_SUMMARY"
49-
fi
50-
5154
- name: Upload report
5255
uses: actions/upload-artifact@v6
5356
if: always()
5457
with:
5558
name: link-check-report
5659
path: ./lychee/out.md
60+
if-no-files-found: ignore
5761
retention-days: 7

.github/workflows/pr-checks.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,17 +78,17 @@ jobs:
7878
SAFE_BODY=$(echo "$PR_BODY" | head -c 2000 | tr -d '\r')
7979
SAFE_FILES=$(echo "$CHANGED_FILES" | head -30)
8080
81-
# Write to outputs using heredoc for multiline safety
81+
# Write to outputs using heredoc with unique delimiters
8282
{
83-
echo "title<<EOF"
83+
echo "title<<TITLE_END_7f3a9c2e"
8484
echo "$SAFE_TITLE"
85-
echo "EOF"
86-
echo "body<<EOF"
85+
echo "TITLE_END_7f3a9c2e"
86+
echo "body<<BODY_END_8b4d1e6f"
8787
echo "$SAFE_BODY"
88-
echo "EOF"
89-
echo "files<<EOF"
88+
echo "BODY_END_8b4d1e6f"
89+
echo "files<<FILES_END_2c5a8d9b"
9090
echo "$SAFE_FILES"
91-
echo "EOF"
91+
echo "FILES_END_2c5a8d9b"
9292
} >> "$GITHUB_OUTPUT"
9393
9494
- name: Suggest title with GitHub Models

.lychee.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ exclude = [
4646
'^https?://docs\.zubax\.com/',
4747
'^https?://visionmedia\.github\.com/',
4848
'^https?://mavlink\.org/',
49+
'^https?://gstreamer\.freedesktop\.org/',
4950

5051
# Bot protection (403)
5152
'^https?://www\.npmjs\.com/',

docs/en/qgc-dev-guide/command_line_options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ The options/command line arguments are listed in the table below.
3333
| Option | Description |
3434
| --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
3535
| `--clear-settings` | Clears the app settings (reverts _QGroundControl_ back to default settings). |
36-
| `--logging:full` | Turns on full logging. See [Console Logging](../../qgc-user-guide/settings_view/console_logging.md#logging-from-the-command-line). |
36+
| `--logging:full` | Turns on full logging. See [Console Logging](../qgc-user-guide/settings_view/console_logging.md#logging-from-the-command-line). |
3737
| `--logging:full,LinkManagerVerboseLog,ParameterLoaderLog` | Turns on full logging and turns off the following listed comma-separated logging options. |
3838
| `--logging:LinkManagerLog,ParameterLoaderLog` | Turns on the specified comma separated logging options |
3939
| `--unittest:name` | (Debug builds only) Runs the specified unit test. Leave off `:name` to run all tests. |

0 commit comments

Comments
 (0)