Skip to content

v0.1.0: first feature-complete stable #72

v0.1.0: first feature-complete stable

v0.1.0: first feature-complete stable #72

Workflow file for this run

name: Deploy Docs
# Builds the mkdocs-material site and publishes it to GitHub Pages via the
# modern actions/deploy-pages flow (not gh-pages branch + mike). Single
# live site at https://jarvy.dev. Versioning via mike was intended but
# never worked — the gh-pages branch was never bootstrapped and
# docs.jarvy.dev DNS was never wired. Single-version site is the simpler
# floor; versioning can come back later if there is real demand.
#
# Triggers:
# - push to main: live docs always reflect the default branch (and the
# auto-generated cli-reference + tools-registry pages it carries)
# - workflow_dispatch: manual rebuild from any ref
#
# Tag pushes are intentionally NOT a trigger. The `github-pages`
# environment has a "Deployment branches" protection rule allowing
# only `main` — tag refs fail the Deploy step silently after 3
# seconds with no log. The release tag's commit lands on main first
# anyway (normal flow), so the main-push run already rebuilds the
# site with that commit. Single-version docs site = no versioned
# rebuild on tags. Re-add tag triggers (and configure the environment
# to allow tag refs) only if versioning via mike comes back.
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
name: Build site
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Cache pip
uses: actions/cache@v5
with:
path: ~/.cache/pip
key: pip-${{ runner.os }}-mkdocs
- name: Install MkDocs Material
run: pip install "mkdocs-material[imaging]" cairosvg Pillow
- name: Sync Helm chart values.schema.json into docs site
run: |
set -euo pipefail
# Source of truth is the chart's values.schema.json. The
# published copy at jarvy.dev/schema/... must be byte-identical
# so external systems pinning to the URL get the same schema
# Helm enforces. Done at build time so we don't maintain two
# copies in git.
mkdir -p docs/schema
cp dist/helm/jarvy-telemetry-forwarder/values.schema.json \
docs/schema/jarvy-telemetry-forwarder.values.schema.json
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Build jarvy binary (for auto-gen pages)
run: cargo build --bin jarvy --release
- name: Generate auto-built docs pages
env:
JARVY_BIN: ${{ github.workspace }}/target/release/jarvy
# Silence the tracing console layer so info-level events from
# jarvy startup do not contaminate JSON-emitting commands
# whose stdout the gen script parses. Architectural fix
# lives in src/analytics.rs (non-error console → stderr);
# this is belt-and-suspenders. Documented in
# docs/release-quirks-jarvy.md.
RUST_LOG: "off"
JARVY_TELEMETRY: "0"
run: bash scripts/gen-docs.sh
- name: Build site (strict)
run: mkdocs build --strict --site-dir site
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: site
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to Pages
id: deployment
uses: actions/deploy-pages@v4
- name: Summary
run: |
echo "## Deployed docs" >> "$GITHUB_STEP_SUMMARY"
echo "" >> "$GITHUB_STEP_SUMMARY"
echo "- **URL:** ${{ steps.deployment.outputs.page_url }}" >> "$GITHUB_STEP_SUMMARY"
echo "- **Ref:** \`${{ github.ref }}\`" >> "$GITHUB_STEP_SUMMARY"
echo "- **Commit:** \`${{ github.sha }}\`" >> "$GITHUB_STEP_SUMMARY"