mirror of
https://github.com/devvmhq/devvm.git
synced 2026-12-01 06:23:17 -10:00
scripts/bump.sh's safe bumps, patches and minors: - images: mise 2026.11.10 -> 2026.11.14 (base and the host's, with internal/tools/mise.go's checksums), nix 2.35.6 -> 2.36.0, Docker's buildx 0.39.0 -> 0.39.1 and model 1.2.9 -> 1.2.10 - e2e: the lock's pnpm 12.21.0 -> 12.23.0, bun 1.4.4 -> 1.4.5, codex 0.169.1 -> 0.171.0, opencode 2.3.2 -> 2.4.1, pi 1.5.2 -> 1.6.0; --from's node:24 by its new digest - dev-tools: nilaway to its newest commit's pseudo-version (0.0.0-20261124161746-91ad9bf5d8e6), goreleaser 2.20.3, vale 3.28.1, markdownlint-cli2 0.24.2, whose lock folder moves to .mise/locks/markdownlint-cli2/0.24.2/, zizmor 1.33.1, with mise.lock - ci: the workflows' mise 2026.11.14, jdx/mise-action v5.3.0, amannn/action-semantic-pull-request v6.1.4 The e2e lock keeps Claude Code at 2.1.327: 2.1.328 made its sign-in link much shorter, without the state parameter that the network section's login check reads to answer it, so with 2.1.330 that check and the refresh after it fail. devvm itself never reads the link. mise's and Nix's new checksums match upstream's SHASUMS256.txt and .sha256 files; buildx and model are apt packages from Docker's signed repository. Cursor's CLI stays on 2026.11.17-f532c45: 2026.11.22-e9042b2 is out, and it moves only when named. pflag stays held below 1.1.0 and Node on 24. The new nilaway no longer reports three of agentsave.go's bounds findings, so their lines leave testdata/nilaway-baseline.txt, which nilaway and nilaway:linux fail on while they're stale. The CHANGELOG's Unreleased has the pins line, and the 0.2.0 page a section for them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
216 lines
8.7 KiB
YAML
216 lines
8.7 KiB
YAML
name: Docs
|
|
|
|
# Two sites. devvm.dev shows the latest release's docs: a published release that isn't a
|
|
# prerelease deploys its tag's docs to GitHub Pages, and so does a dispatch, with any release's
|
|
# tag. next.devvm.dev shows main's: each push to main that changes the docs builds them with
|
|
# docs/next.yaml and commits the site to devvmhq/docs-next, which Cloudflare Pages serves.
|
|
# Pull requests touching the docs get their lints and a build, and nothing else.
|
|
# The site is built from docs/ alone (the CLI reference included, which a help change commits
|
|
# there), and CI's lint runs the docs checks on every code change, so other pushes skip this.
|
|
# A release event runs this file as its tag has it.
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths: &docs-paths
|
|
- "docs/**"
|
|
- "**.md"
|
|
- ".vale.ini"
|
|
- ".vale/**"
|
|
- ".markdownlint-cli2.yaml"
|
|
- ".github/workflows/docs.yml"
|
|
pull_request:
|
|
paths: *docs-paths
|
|
release:
|
|
types: [published]
|
|
workflow_dispatch:
|
|
inputs:
|
|
site:
|
|
description: The site to deploy
|
|
type: choice
|
|
options: [devvm.dev, next.devvm.dev]
|
|
default: devvm.dev
|
|
ref:
|
|
description: "devvm.dev only: the release tag whose docs it shows, such as v0.1.0 (empty: the latest release)"
|
|
type: string
|
|
required: false
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
# main's docs, or a pull request's: the lints and a build.
|
|
check:
|
|
if: >-
|
|
github.event_name == 'pull_request' || github.event_name == 'push' ||
|
|
(github.event_name == 'workflow_dispatch' && inputs.site == 'next.devvm.dev')
|
|
runs-on: ubuntu-latest
|
|
# A pull request's newer run replaces its last.
|
|
concurrency:
|
|
group: docs-check-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
env:
|
|
# Only the docs' tools, not every tool in mise.toml.
|
|
MISE_TASK_RUN_AUTO_INSTALL: "false"
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
# Full history, for each page's last updated date.
|
|
fetch-depth: 0
|
|
- uses: jdx/mise-action@924e7c586e33d7d4bae9c14e26c5d22e2beb6e78 # v5.3.0
|
|
with:
|
|
version: 2026.11.14
|
|
install_args: go hugo node markdownlint-cli2 vale lychee
|
|
# The workflow publishes, so no job in it reads a cache another run could have written.
|
|
cache: false
|
|
# It draws the diagrams first (docs:diagrams), which the build below uses too.
|
|
- run: mise run lint:docs
|
|
# The site's address is baseURL in docs/hugo.yaml.
|
|
- run: hugo -s docs --minify
|
|
|
|
# next.devvm.dev: main's docs, committed to devvmhq/docs-next.
|
|
next:
|
|
if: >-
|
|
github.ref == 'refs/heads/main' &&
|
|
(github.event_name == 'push' ||
|
|
(github.event_name == 'workflow_dispatch' && inputs.site == 'next.devvm.dev'))
|
|
needs: check
|
|
runs-on: ubuntu-latest
|
|
# One push at a time; a newer run waiting replaces an older one.
|
|
concurrency:
|
|
group: docs-next
|
|
cancel-in-progress: false
|
|
# The environment holds the deploy key, and only main can use it.
|
|
environment:
|
|
name: docs-next
|
|
url: https://next.devvm.dev/
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
fetch-depth: 0
|
|
- uses: jdx/mise-action@924e7c586e33d7d4bae9c14e26c5d22e2beb6e78 # v5.3.0
|
|
with:
|
|
version: 2026.11.14
|
|
install_args: go hugo node
|
|
# What's published is built from no cache.
|
|
cache: false
|
|
# The diagrams, drawn before the build (docs/render-diagrams.mjs).
|
|
- run: mise run docs:diagrams
|
|
# docs/next.yaml over docs/hugo.yaml: next.devvm.dev's address, the banner and noindex.
|
|
- run: hugo -s docs --minify --config hugo.yaml,next.yaml -d "$RUNNER_TEMP/next"
|
|
# The key is checked out only after the build, which never sees it.
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
repository: devvmhq/docs-next
|
|
ref: main
|
|
path: docs-next
|
|
ssh-key: ${{ secrets.DOCS_NEXT_DEPLOY_KEY }}
|
|
# The push below needs the key; this checkout is the only thing that uses it.
|
|
persist-credentials: true # zizmor: ignore[artipacked] -- the push needs the deploy key, and nothing is uploaded
|
|
- name: Publish
|
|
working-directory: docs-next
|
|
run: |
|
|
# Everything but README.md is the site's.
|
|
find . -mindepth 1 -maxdepth 1 ! -name .git ! -name README.md -exec rm -rf {} +
|
|
cp -R "$RUNNER_TEMP/next/." .
|
|
git add -A
|
|
if git diff --cached --quiet; then
|
|
echo "next.devvm.dev is already this build."
|
|
exit 0
|
|
fi
|
|
git -c user.name="github-actions[bot]" \
|
|
-c user.email="41898282+github-actions[bot]@users.noreply.github.com" \
|
|
commit -q -m "Build from devvm ${GITHUB_SHA::7}"
|
|
git push origin HEAD:main
|
|
|
|
# devvm.dev: a release's docs, built from its tag.
|
|
release:
|
|
if: >-
|
|
(github.event_name == 'release' && !github.event.release.prerelease) ||
|
|
(github.event_name == 'workflow_dispatch' && inputs.site == 'devvm.dev')
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
# Only the tools the install step picks: mise run and a shim would otherwise install every
|
|
# tool in the tag's mise.toml, and a tool it missed fails the build rather than downloads.
|
|
MISE_AUTO_INSTALL: "false"
|
|
steps:
|
|
- id: tag
|
|
name: The release's tag
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
EVENT: ${{ github.event_name }}
|
|
RELEASE_TAG: ${{ github.event.release.tag_name }}
|
|
INPUT_REF: ${{ inputs.ref }}
|
|
run: |
|
|
if [ "$EVENT" = release ]; then
|
|
tag=$RELEASE_TAG
|
|
elif [ -n "$INPUT_REF" ]; then
|
|
tag=$INPUT_REF
|
|
else
|
|
tag=$(gh release view --repo devvmhq/devvm --json tagName --jq .tagName)
|
|
fi
|
|
if ! [[ "$tag" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
|
echo "::error::A release tag is vX.Y.Z, such as v0.1.0; this is $tag."
|
|
exit 1
|
|
fi
|
|
echo "tag=$tag" >> "$GITHUB_OUTPUT"
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
ref: refs/tags/${{ steps.tag.outputs.tag }}
|
|
persist-credentials: false
|
|
# Full history, for each page's last updated date.
|
|
fetch-depth: 0
|
|
- uses: jdx/mise-action@924e7c586e33d7d4bae9c14e26c5d22e2beb6e78 # v5.3.0
|
|
with:
|
|
version: 2026.11.14
|
|
# The next step installs only what the build needs.
|
|
install: false
|
|
# What's published is built from no cache.
|
|
cache: false
|
|
# Only what the build needs, at the versions of the tag's own mise.toml, as mise reads it: Go,
|
|
# for Hugo's modules, Hugo by the name the tag gives it (hugo-extended in a tag from before Hugo
|
|
# 0.170), and Node when the tag draws its diagrams.
|
|
- run: |
|
|
want='^(go|hugo|hugo-extended)$'
|
|
if [ -f docs/render-diagrams.mjs ]; then
|
|
want='^(go|hugo|hugo-extended|node)$'
|
|
fi
|
|
mapfile -t tools < <(mise ls --current --json |
|
|
jq -r --arg f "$(pwd -P)/mise.toml" 'to_entries[] | select(any(.value[]; .source.path == $f)) | .key' |
|
|
grep -E "$want")
|
|
if ! printf '%s\n' "${tools[@]}" | grep -qE '^hugo(-extended)?$'; then
|
|
echo "::error::The tag's mise.toml names no Hugo."
|
|
exit 1
|
|
fi
|
|
# --locked, as mise-action adds where the tag has a mise.lock: every download from the lock.
|
|
mise install --locked "${tools[@]}"
|
|
# The tag's diagrams, drawn before the build, when its docs draw them (docs/render-diagrams.mjs);
|
|
# an older tag's pages load Mermaid instead.
|
|
- run: |
|
|
if [ -f docs/render-diagrams.mjs ]; then
|
|
mise run docs:diagrams
|
|
fi
|
|
# The tag's docs/hugo.yaml, whose baseURL is devvm.dev.
|
|
- run: hugo -s docs --minify
|
|
- uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
|
|
with:
|
|
path: docs/public
|
|
|
|
deploy:
|
|
needs: release
|
|
runs-on: ubuntu-latest
|
|
# Deploys queue one after another.
|
|
concurrency:
|
|
group: docs-pages
|
|
cancel-in-progress: false
|
|
permissions:
|
|
pages: write # to deploy the site
|
|
id-token: write # to prove the deployment comes from this workflow
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
steps:
|
|
- id: deployment
|
|
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1
|