Skip to content

Fix dash-lint: replace mdash entities in PatchEval disclaimer #5

Fix dash-lint: replace mdash entities in PatchEval disclaimer

Fix dash-lint: replace mdash entities in PatchEval disclaimer #5

Workflow file for this run

name: Deploy Pages
on:
push:
branches: ["main"]
paths:
- "docs/website/**"
- ".github/workflows/pages.yml"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Copy rule against em-dashes and en-dashes
# Fail the build if a stray em-dash or en-dash slips into shipped copy
# (user rule: substitute periods / colons / hyphens / parens). Runs
# before cache-bust to fail early on the raw source.
run: |
if grep -rnE '—|–|—|–' $(find docs/website -name '*.html') docs/website/js/*.js; then
echo "::error::em-dash / en-dash found in shipped copy. Substitute periods, colons, or hyphens."
exit 1
fi
- name: Cache-bust static assets with commit SHA
# Append ?v=<short-sha> to css/js references in every deployed HTML file
# so browsers refetch on every deploy instead of serving stale files.
# Walks all HTML files recursively (root + subdirectories). Regex matches
# both root-relative (css/foo.css) and parent-relative (../css/foo.css)
# asset paths so subpages under docs/website/{slug}/ are handled too.
run: |
SHA=${GITHUB_SHA::12}
for FILE in $(find docs/website -name '*.html'); do
sed -i -E "s|(href=\"((\\.\\./)*)css/(style|harness)\\.css)\"|\\1?v=$SHA\"|g" "$FILE"
sed -i -E "s|(src=\"((\\.\\./)*)js/(data|main|patchloop)\\.js)\"|\\1?v=$SHA\"|g" "$FILE"
done
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v3
with:
path: docs/website
- id: deployment
uses: actions/deploy-pages@v4