Skip to content

Commit ad8185c

Browse files
brabojclaude
andcommitted
fix: use symlink to mirror Astro base path for lychee
Create dist/tutorial-git -> dist/ symlink so root-relative links like /tutorial-git/introduction/ resolve correctly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d8e551c commit ad8185c

3 files changed

Lines changed: 6 additions & 10 deletions

File tree

.github/workflows/build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ jobs:
3030
working-directory: astro-site
3131
run: npm run build
3232

33+
- name: Create base path symlink for link checker
34+
run: ln -s . astro-site/dist/tutorial-git
35+
3336
- name: Check links
3437
uses: lycheeverse/lychee-action@v2
3538
with:

.github/workflows/deploy.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ jobs:
3939
working-directory: astro-site
4040
run: npm run build
4141

42+
- name: Create base path symlink for link checker
43+
run: ln -s . astro-site/dist/tutorial-git
44+
4245
- name: Check links
4346
uses: lycheeverse/lychee-action@v2
4447
with:

lychee.toml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
# Lychee link checker configuration
22
# Runs against the Astro build output in astro-site/dist/
33

4-
# Remap the /tutorial-git/ base path to the dist root so that
5-
# root-relative links like /tutorial-git/introduction/ resolve
6-
# to dist/introduction/index.html
7-
remap = ["^/tutorial-git/(.*) /$1"]
8-
9-
# Skip external links in CI to avoid flaky failures from transient
10-
# network issues. Run with --include-mail to check mailto: links.
11-
exclude_path = []
12-
134
# Exclude external URLs to keep CI fast and deterministic
145
exclude = [
156
"^https://",
@@ -19,5 +10,4 @@ exclude = [
1910
# Accept 200 and 204
2011
accept = [200, 204]
2112

22-
# No caching needed in CI
2313
no_progress = true

0 commit comments

Comments
 (0)