mirror of
https://github.com/devvmhq/devvm.git
synced 2026-12-01 16:27:33 -10:00
scripts/bump.sh's safe bumps (patches and minors; no majors or held pins): images (assets/): - mise 2026.11.8 -> 2026.11.10 (base's, and the host's resolving mise) - docker 29.9.3 -> 29.10.0, compose 5.7.1 -> 5.8.0 e2e: - claude 2.1.322 -> 2.1.326, codex 0.167.2 -> 0.169.1, opencode 2.2.7 -> 2.3.0 - pnpm 12.18.0 -> 12.21.0, uv 0.13.7 -> 0.13.9, rust 1.99.1 -> 1.100.0 - ubuntu:26.04 digest 065aa8626841 -> d66b366dac61 - Ubuntu's cloud image release-20261016 -> release-20261108 go: deadcode v0.52.0 -> v0.53.0 dev-tools: govulncheck 1.9.0 -> 1.10.0, vale 3.26.0 -> 3.27.0, hugo-extended 0.169.0 -> hugo 0.170.1 ci: jdx/mise-action v5.2.8 -> v5.2.10, the workflows' mise 2026.11.8 -> 2026.11.10 Hugo 0.170 has no extended edition (one binary, without LibSass, which the site doesn't use): mise.toml's hugo-extended becomes hugo, the docs workflow installs hugo, its release job installs the tag's own tools (an older tag names hugo-extended), and docs/hugo.yaml drops the deprecated hugoVersion.extended. The e2e runner deletes its sandbox's Ubuntu pin when it names a release other than e2eUbuntuRelease (not in a --newest-base run), as devvm keeps a pin it has: without it, moving e2eUbuntuRelease left a cached sandbox on the old release. pinned and ubuntuPin are e2e's one reader of the pin, and TestHarnessRepin covers repin. Image keys change: base and every image above it, the docker layer's included, and the shared tools' images build again. Co-Authored-By: Claude Opus 5.5 <[email protected]>
195 lines
7.6 KiB
YAML
195 lines
7.6 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@90f833d396d0cc3674b631d2d225e306476c303a # v5.2.10
|
|
with:
|
|
version: 2026.11.10
|
|
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@90f833d396d0cc3674b631d2d225e306476c303a # v5.2.10
|
|
with:
|
|
version: 2026.11.10
|
|
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
|
|
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@90f833d396d0cc3674b631d2d225e306476c303a # v5.2.10
|
|
with:
|
|
version: 2026.11.10
|
|
# No install_args: every tool in the tag's mise.toml, as a tag from before Hugo 0.170 names
|
|
# Hugo as hugo-extended.
|
|
# What's published is built from no cache.
|
|
cache: false
|
|
# 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
|