GitHub Actions¶
This repo uses GitHub Actions for two things:
- publishing the Vouch docs site to GitHub Pages
- running the current Vouch gate in pull request workflows
Published docs URL:
https://duriantaco.github.io/vouch/
GitHub Pages is configured with build_type: workflow, so content is published
by .github/workflows/pages.yml after changes land on main.
Docs Deployment¶
The Pages workflow follows GitHub's custom Actions publishing flow:
actions/configure-pagesactions/upload-pages-artifactactions/deploy-pages
Workflow file:
.github/workflows/pages.yml
Source files:
mkdocs.yml
docs/site/
docs/site/assets/vouch.png
The workflow builds the MkDocs site into _site/, uploads that artifact, and
deploys it to the github-pages environment.
Official references:
- Configuring a publishing source for your GitHub Pages site
- actions/upload-pages-artifact
- actions/deploy-pages
Vouch PR Workflow¶
The current Vouch PR workflow should start in shadow mode. It appends a job
summary and uploads .vouch/build/gate-result.json without blocking the PR.
name: Vouch
on:
pull_request:
jobs:
vouch:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.26"
- name: Install Vouch
run: go install github.com/duriantaco/vouch/cmd/vouch@latest
- name: Compile Vouch contracts
run: vouch compile
- name: Run tests
run: pytest --junitxml .vouch/artifacts/pytest.xml
- name: Import JUnit evidence
run: vouch evidence import junit .vouch/artifacts/pytest.xml
- name: Gate PR
continue-on-error: true
run: vouch gate --github-summary --out .vouch/build/gate-result.json
- name: Upload Vouch result
uses: actions/upload-artifact@v4
with:
name: vouch-gate-result
path: .vouch/build/gate-result.json
Code References¶
- CLI command and
--github-summaryflag:internal/vouch/cli.go $GITHUB_STEP_SUMMARYhandling:appendGitHubSummary- Markdown summary rendering:
RenderGitHubSummary - Gate result JSON:
GateResultFromEvidence - Default release policy:
DefaultReleasePolicy
Enforced Mode¶
After a shadow-mode pilot, remove continue-on-error: true from the gate step.
The CLI exits non-zero only when the final decision is block.