chore(ci): docs build CI workflow (REQ-032, D-046, D-051, G-016)
Add .gitea/workflows/docs-build.yml: on push, go-test job runs go test ./... (lexicon firewall + all x/* tests), then docs-build job (needs: go-test per G-016 firewall-gates-docs-build) installs mkdocs + mkdocs-material, runs mkdocs build, uploads site/ as a CI artifact. go.mod unchanged (Python deps isolated to the docs-build job; G-006 intact). Full Gitea Pages publishing deferred per D-051 (no hosting target configured). .gitignore: add site/ (mkdocs build output; never committed). Verification: YAML parses; docs-build needs go-test; go test ./... green; go.mod unchanged; local mkdocs build succeeds (site/ produced). ---ci--- project: oy phase: 3 milestone: v0.4 status: execute tag_base: v0.3.x milestone_type: nfr reqs: [REQ-032] ---/ci---
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
# OpenYield docs build CI (REQ-032, D-046 forward-reference, D-051, G-016).
|
||||
#
|
||||
# Runs the lexicon firewall (go test ./...) AND builds the MkDocs Material docs
|
||||
# site on every push. The docs-build job DEPENDS on go-test (G-016 binding:
|
||||
# firewall-gates-docs-build — a lexicon violation blocks the docs build so no
|
||||
# false-green docs artifact is produced from a repo with a firewall failure).
|
||||
#
|
||||
# Scope (chore, not feat: per D-001 refinement-only filter):
|
||||
# - go-test job: setup Go 1.22, run `go test ./...` (lexicon firewall + all
|
||||
# x/* tests + the v0.4 cross-const test). Zero external Go deps (G-006).
|
||||
# - docs-build job: setup Python, pip install mkdocs + mkdocs-material
|
||||
# (build-only Python deps, ISOLATED to this job — go.mod is NOT modified),
|
||||
# run `mkdocs build` (produces site/), upload site/ as a CI artifact.
|
||||
#
|
||||
# Out of scope (deferred per D-051): full Gitea Pages publishing. v0.4 ships
|
||||
# build + artifact only; a hosting target is not configured.
|
||||
#
|
||||
# Triggers: on push (all branches) so the firewall + docs build are checked
|
||||
# on every change, not just on main.
|
||||
|
||||
name: docs-build
|
||||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
go-test:
|
||||
name: go test ./... (lexicon firewall + all x/* tests)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.22'
|
||||
- name: go test ./...
|
||||
run: go test ./...
|
||||
|
||||
docs-build:
|
||||
name: mkdocs build (docs site artifact)
|
||||
runs-on: ubuntu-latest
|
||||
needs: go-test # G-016: firewall-gates-docs-build (no false-green docs build)
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: install mkdocs + mkdocs-material
|
||||
run: pip install mkdocs mkdocs-material
|
||||
- name: mkdocs build
|
||||
run: mkdocs build
|
||||
- name: upload site/ artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: docs-site
|
||||
path: site/
|
||||
retention-days: 14
|
||||
@@ -2,3 +2,5 @@
|
||||
.env.secrets
|
||||
.env.*
|
||||
.ciagent/.env.secrets
|
||||
# MkDocs build output (REQ-032 CI produces site/ as an artifact; never commit it)
|
||||
site/
|
||||
|
||||
Reference in New Issue
Block a user