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
28 changes: 14 additions & 14 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,10 @@ jobs:
echo "No previous discovery manifest (first deployment)."
fi

- name: Run validation
# `just validate` runs a live data sync on fresh checkouts (no cache /
# docs mirror yet), so pass a token to avoid unauthenticated rate limits.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: just validate

- name: Refresh live release and documentation data
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: DATA_MODE=live bun run data:sync

- name: Resolve deployment base and site URL
# Resolved before validation, not after it: `just validate` is also what
# builds the site, so the base and the site URL have to be in the
# environment for that build to be the artifact that ships.
id: pages-config
env:
REPO_NAME: ${{ github.event.repository.name }}
Expand All @@ -118,13 +109,22 @@ jobs:
echo "pages-base=$BASE" >> "$GITHUB_OUTPUT"
echo "site-url=$SITE" >> "$GITHUB_OUTPUT"

- name: Build site with live data
- name: Run validation
# One pass: `just validate` runs the live data sync (a fresh checkout has
# no cache or docs mirror, so pass a token to avoid unauthenticated rate
# limits), builds, and runs every check. The deployment base and site URL
# are in the environment, so the build it produces is the one that is
# uploaded and the link, SEO and dist checks see the URLs the deployment
# actually serves. This used to re-sync all data and rebuild the site
# afterwards, with nothing in between to invalidate the first result.
#
# The build never receives the IndexNow key: the key verification file is
# written from the secret by a separate step below (see docs/discovery.md).
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PAGES_BASE: ${{ steps.pages-config.outputs.pages-base }}
SITE_URL: ${{ steps.pages-config.outputs.site-url }}
run: bun run build
run: just validate

- name: Write the IndexNow key verification file
# The key is supplied only by the INDEXNOW_KEY repository secret and is
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -565,8 +565,10 @@ Do not try to force the GitHub toggle on: it would require temporarily setting
the Cloudflare DNS record to **DNS only** (grey cloud) so GitHub can issue the
certificate, and renewals can fail again once the record is proxied.

The workflow validates (`just validate`), refreshes live release/documentation
data, builds, and uploads `./src/dist`.
The workflow resolves the deployment base and site URL, then runs
`just validate` once: that syncs the release and documentation data live (a
fresh checkout has no cache), builds the site with the resolved base applied,
and runs every check against it. It uploads `./src/dist`.

### Repository-dispatch integration

Expand Down
12 changes: 10 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ install:
install-hooks:
bunx lefthook install

# Cache-first so a recipe that runs after another sync does not re-fetch every
# release, package and documentation page a second time. `just validate` relies
# on this: its first sync is live on a fresh checkout and its build reuses it.
# Refresh docs mirrors and release data (cache-first).
data-sync:
bun run data:sync
Expand Down Expand Up @@ -59,8 +62,13 @@ test:
test-dist:
bun run test:dist

# Produce a production build (runs data sync first).
build: live-data-sync
# The data sync is cache-first: on a fresh checkout it fetches live, and
# otherwise it reuses the release cache and the docs mirror built from it, so a
# recipe that runs after another sync does not re-fetch everything a second
# time. Run `just live-data-sync` first when a build must use freshly fetched
# data.
# Produce a production build (dependency: data sync).
build: data-sync
bun run build

# Full CI validation chain used by the shared build pipeline (data sync → typecheck → build → checks).
Expand Down
2 changes: 1 addition & 1 deletion skills/site-validation-loop/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ tags:
| Unit tests | `just test` (`bun test tests/unit`) | Manifest/schema rules, catalogue guard, docs aggregation rules, release transform, urls, staleness, branding |
| Assets | `just check-assets` | Branding sources vs generated public assets |
| Catalogue | `just check-projects` | Catalogue invariants (see below) |
| Build | `just build` (runs live data sync first) | Astro/Starlight build, sidebar/llms plugin wiring |
| Build | `just build` (runs a cache-first data sync first) | Astro/Starlight build, sidebar/llms plugin wiring |
| Links | `just check-links` | Broken internal links **and missing anchors** across `dist/**/*.html` |
| Generated output | `just check-generated` | Docs cache/mirror agreement, release cache shape, mirrored project assets exist and are valid JSON, `llms*.txt`, sitemap, robots, no secrets/local paths |
| Dist tests | `just test:dist` | Per-project LLM bundles, rendered project/use-case surfaces, footer version, SEO outputs |
Expand Down
Loading