Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/cloudflare-preview-forks-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,12 @@ jobs:
- name: Install dependencies
run: npm ci

# textlint and prettier run in test.yml. They are left out here so a
# wording or formatting problem doesn't hold back the preview.
# textlint, prettier, and failing on broken links run in test.yml. They
# are left out here so those problems don't hold back the preview.
- name: Build
run: npm run build
env:
PREVIEW_BUILD: "true"

- name: Save PR number
run: echo "${{ github.event.pull_request.number }}" > dist/pr-number.txt
Expand Down
7 changes: 6 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,12 @@ export default defineConfig({
prefetch(),
linkValidator({
checkExternal: false,
failOnBrokenLinks: true,
// Previews report broken links without failing, like textlint and
// prettier; the build in test.yml is the check that fails.
failOnBrokenLinks: !(
process.env.PREVIEW_BUILD ||
(process.env.CF_PAGES && process.env.CF_PAGES_BRANCH !== "main")
),
exclude: ["/_astro/*", "/s/*", "/board", "/download/*"],
}),
],
Expand Down
Loading