Skip to content

feat: Cursor harness support (2.5.58) #255

feat: Cursor harness support (2.5.58)

feat: Cursor harness support (2.5.58) #255

Workflow file for this run

name: Deploy Documentation
on:
push:
branches:
- v2
# Only rebuild/deploy the site when something the build actually consumes
# changes: the docs sources, the zensical config, the link-rewrite step,
# the Python deps it installs, or this workflow itself.
paths:
- 'docs/**'
- 'zensical.toml'
- 'scripts/docs-rewrite-links.ts'
- 'pyproject.toml'
- 'uv.lock'
- '.github/workflows/docs.yml'
pull_request:
branches:
- v2
paths:
- 'docs/**'
- 'zensical.toml'
- 'scripts/docs-rewrite-links.ts'
- 'pyproject.toml'
- 'uv.lock'
- '.github/workflows/docs.yml'
workflow_dispatch:
# The build job validates every PR and push; only the deploy job needs
# Pages/OIDC permissions, granted at job level below.
permissions:
contents: read
# PR validation builds are independently cancellable per ref; production
# deployments are serialized separately (see the deploy job's `pages` group)
# so a push deploy and a manual dispatch can never interleave and an older
# run cannot overwrite a newer site.
concurrency:
group: docs-build-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
version: '0.11.28'
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.12'
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
- name: Install dependencies
run: uv sync --locked --group docs
# The committed markdown keeps relative links into dist/, core/, etc. so
# local clones navigate to the real files; the published site is built
# from docs/ only, so rewrite those links to GitHub blob URLs here
# (in-place on the CI checkout, never committed). The script exits 1 if
# a linked file is missing, failing the build before a dead link ships.
- name: Rewrite out-of-tree links to GitHub URLs
run: bun scripts/docs-rewrite-links.ts
- name: Build documentation
run: uv run zensical build --strict
# The roadmap lived at /roadmap.html under the legacy Jekyll rendering;
# keep that URL working (the root roadmap.html stub covers the
# pre-activation era, this one covers the Zensical site).
- name: Emit legacy /roadmap.html redirect
run: printf '%s\n' '<!doctype html><meta charset="utf-8"><meta http-equiv="refresh" content="0; url=roadmap/"><title>Roadmap moved</title><a href="roadmap/">The roadmap has moved.</a>' > site/roadmap.html
- uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
if: github.event_name != 'pull_request'
with:
path: site
deploy:
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
needs: build
# One shared production group across push and manual runs, never
# cancelled mid-deploy (the Pages starter-workflow convention).
concurrency:
group: pages
cancel-in-progress: false
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0