Skip to content

chore(release): v1.0.3 #114

chore(release): v1.0.3

chore(release): v1.0.3 #114

Workflow file for this run

name: Deploy demo
# Build the GitHub Pages demo and publish it via GitHub Actions on every push to
# main that changes a demo input. The built bundles (docs/streaming-markdown.*.mjs)
# are no longer committed to git — this workflow is the single source of the
# published site, so it can never drift from the renderer source.
#
# REQUIRES the repo's Pages source to be set to "GitHub Actions"
# (Settings -> Pages -> Build and deployment -> Source). Until that is flipped the
# deploy step has nowhere to publish.
on:
push:
branches: [main]
paths:
- 'src/**'
- 'styles/**'
- 'docs/**'
- 'package.json'
- 'package-lock.json'
- 'tsconfig.json'
- 'tsconfig.build.json'
- '.github/workflows/deploy-demo.yml'
workflow_dispatch:
# Least privilege for a Pages deployment: read the code, write the Pages
# deployment, and mint the OIDC token deploy-pages authenticates with.
permissions:
contents: read
pages: write
id-token: write
# One Pages deployment at a time; a newer push waits rather than cancelling an
# in-flight deploy.
concurrency:
group: pages
cancel-in-progress: false
jobs:
# Runner routing: the shared self-hosted `copse-checks` pool when the
# CHECKS_RUNNER Actions variable is set, else GitHub-hosted — same
# variable-based scheme as ci.yml (see its routing note; this replaced a
# per-run `pick-runner` probe job). Trusted main-branch content only.
build:
runs-on: ${{ vars.CHECKS_RUNNER || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 22
cache: npm
- run: npm ci
- name: Build demo
run: npm run build:demo
# docs/ is the published site: index.html + the freshly built bundles.
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v5
with:
path: docs
deploy:
needs: build
# Deliberately NOT routed to the self-hosted pool: it's a pure API call
# (deploy-pages), free on a public repo, and shouldn't depend on fleet
# uptime.
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
steps:
- id: deploy
uses: actions/deploy-pages@v5