mirror of
https://github.com/devvmhq/devvm.git
synced 2026-12-01 21:36:40 -10:00
The tests assumed a macOS host with 4 or more CPUs: - size: the stub VM has 2 CPUs, which any host running the tests has - ls, images: smolvm's --state-dir on Linux - docker: .git protection is off on Linux - the limactl stub's delete forgets the VM's port forwards and ssh port, as Lima does, so from's second conversion VM is configured again - TestStartForwarder confines Lima's start as the host does (no sandbox-exec on Linux) - TestProcessArgs runs sh, which ignores the extra arguments GNU sleep exits on lint:code runs actionlint and zizmor (offline) on the workflows; ci.yml's paths are written out, without a YAML anchor, and the deploy job's permissions say why. Co-Authored-By: Claude Opus 5.5 <[email protected]>
62 lines
1.8 KiB
YAML
62 lines
1.8 KiB
YAML
name: Docs
|
|
|
|
# Pull requests touching the docs get their lints and a build; main deploys.
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
paths:
|
|
- "docs/**"
|
|
- "**.md"
|
|
- ".vale.ini"
|
|
- ".vale/**"
|
|
- ".markdownlint-cli2.yaml"
|
|
- ".github/workflows/docs.yml"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
# Deploys queue one after another; a pull request's newer run replaces its last.
|
|
concurrency:
|
|
group: docs-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
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@6be3c7ed4c21d4f76b208d351d95aac273ebb76d # v5.2.4
|
|
with:
|
|
version: 2026.10.18
|
|
install_args: go hugo-extended node markdownlint-cli2 vale lychee
|
|
- run: mise run lint:docs
|
|
# The site's address is baseURL in docs/hugo.yaml.
|
|
- run: hugo -s docs --minify
|
|
- if: github.event_name != 'pull_request'
|
|
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
|
|
with:
|
|
path: docs/public
|
|
|
|
deploy:
|
|
if: github.event_name != 'pull_request'
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
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
|