Skip to content

fix(pages): upgrade actions to Node.js 24 compatible versions #3

fix(pages): upgrade actions to Node.js 24 compatible versions

fix(pages): upgrade actions to Node.js 24 compatible versions #3

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches:
- main
paths:
- 'docs/**'
- '.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:
- name: Checkout
uses: actions/checkout@v6
with:
lfs: true
- name: Cache-bust video URLs
env:
GITHUB_SHA: ${{ github.sha }}
run: |
python3 <<'PY'
import os, pathlib, re
sha = os.environ["GITHUB_SHA"][:12]
path = pathlib.Path("docs/index.html")
if not path.exists():
exit(0)
text = path.read_text(encoding="utf-8")
new = re.sub(
r'src="(demos/recordings/[^"?]+\.mp4)(?:\?[^"]*)?"',
lambda m: f'src="{m.group(1)}?v={sha}"',
text,
)
path.write_text(new, encoding="utf-8")
PY
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
path: docs
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4