10.06 — ocarina-holy-book workflow#
A single workflow:
deploy.yml. On push main → VitePress build → upload Pages.
Code#
name: Deploy Ocarina Holy Book
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
env:
TZ: Europe/Paris
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0 # ← full clone
- uses: pnpm/action-setup@fcf821c621167805dd63a29662bd7cb5676c81a8
name: Install pnpm
with:
version: 11
- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version: 24
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm build
- uses: actions/upload-pages-artifact@v4
with:
path: docs/.vitepress/dist
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v5Analysis#
1. TZ: Europe/Paris#
env:
TZ: Europe/ParisForces the runner timezone to Europe/Paris. Dates rendered by VitePress ("Last update: 05/18/2026 11h42") are in Paris time, not UTC. Leaving it in UTC would cause mysterious date bugs.
2. fetch-depth: 0#
- uses: actions/checkout@v6
with:
fetch-depth: 0fetch-depth: 0 = full git clone (vs depth 1 by default).
VitePress (via the @sugarat/theme) reads the Git log to compute each page’s “Last update” date. Without full history: VitePress only sees the last commit, every page would have the same date.
3. pnpm/action-setup SHA-pinned#
- uses: pnpm/action-setup@fcf821c621167805dd63a29662bd7cb5676c81a8Version pinning by SHA is used everywhere for non-official actions (not prefixed with actions/) to mitigate Supply Chain Attack risks.
4. --frozen-lockfile#
5. concurrency: pages, cancel-in-progress: false#
Prevents simultaneous deploys to GitHub Pages (race condition).
Build#
pnpm build
# = vitepress build docsVitePress produces:
- Static HTML per route (EN + FR + RU).
- JS/CSS bundle.
pagefind/search index.llms.txt+llms-full.txt(via the in-house plugin).- PDFs served from
public/.
Output: docs/.vitepress/dist/.
Deployment#
- uses: actions/upload-pages-artifact@v4
with:
path: docs/.vitepress/dist- id: deployment
uses: actions/deploy-pages@v5Final URL#
https://mojo-molotov.github.io/ocarina-holy-book/
/ocarina-holy-book prefix configured in config.mts#base:
const base =
process.env.GITHUB_ACTIONS === "true" ? "/ocarina-holy-book/" : "/";PR trigger#
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:pull_request is included. Every PR builds the site to verify nothing is broken, but doesn’t deploy.
No automated dynamic tests#
The Holy Book has no automated dynamic tests. Tested manually.
Cadences#
| Trigger | Frequency |
|---|---|
| Push main | On every commit merged to main |
| PR | On every push to a PR |
| Manual | On demand |