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
25 changes: 24 additions & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
timeout-minutes: 30
outputs:
trusted-sha: ${{ steps.revision.outputs.sha }}
marker: ${{ steps.marker.outputs.path }}
steps:
- uses: actions/checkout@v7
with:
Expand All @@ -51,6 +52,13 @@ jobs:
- run: node scripts/site-ci.ts assemble
env:
GH_TOKEN: ${{ github.token }}
# The CDN caches 404s, so each deploy check polls a path nobody requested before.
- id: marker
run: |
marker="deploy-marker/$GITHUB_RUN_ID-$GITHUB_RUN_ATTEMPT"
mkdir -p "site/$marker"
for n in $(seq 1 30); do echo "$n" > "site/$marker/$n"; done
echo "path=$marker" >> "$GITHUB_OUTPUT"
- uses: actions/upload-pages-artifact@v5
with:
path: site/
Expand Down Expand Up @@ -92,4 +100,19 @@ jobs:
GH_TOKEN: ${{ github.token }}
- name: Deploy current site
id: deployment
uses: actions/deploy-pages@v5
uses: actions/deploy-pages@v5
# Pages can report success and keep serving the previous deployment.
- name: Require Pages to serve this deployment
env:
SITE_URL: ${{ steps.deployment.outputs.page_url }}
MARKER: ${{ needs.assemble.outputs.marker }}
run: |
for n in $(seq 1 30); do
if curl -fs --max-time 10 -o /dev/null "${SITE_URL%/}/$MARKER/$n"; then
echo "Pages serves this deployment after $n checks"
exit 0
fi
sleep 10
done
echo "::error::Pages still serves an older deployment. Rerun the deploy job."
exit 1
3 changes: 2 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ Pages skips a preview whose build lacks `index.html`, contains symbolic links, h

Publication calls Pages after a main push or a data change. Pages also runs for
successful preview builds and preview eligibility changes. Run Pages manually
after a direct push to `data`.
after a direct push to `data`. The deploy job fails if the site still serves an
older deployment after 5 minutes. Rerun the deploy job.

Publication and Pages use serial queues with up to 100 pending jobs or runs each.
Benchmark checks ignore unrelated labels and title or body edits.
Expand Down
Loading