| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Composite GitHub Action that:
This action is now a composite action that installs its own prerequisites:
You no longer need to pre-install these in your workflow.
| Input | Default | Description |
|---|---|---|
| github_token | (required) | Token with contents: write permissions |
| run_benchmarks | true | Run benchmarks & update history |
| bench_branch | bench-data | Branch storing JSON benchmark history |
| site_name | (derived) | Override site title |
| extra_nav_docs | true | Include docs/ in nav |
| nav_order | home,reference,coverage,bench,docs | Custom nav ordering |
| embed_coverage_html | true | Embed cover.html iframe in coverage page |
| fail_on_test_failure | false | Fail action if Go tests fail |
| Output | Description |
|---|---|
| site_dir | Built site directory path |
| coverage_percent | Overall statements coverage percent |
name: docs
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
id-token: write
steps:
- uses: actions/checkout@v4
- name: Generate site
id: docs
uses: devnw/doc-pages@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: ${{ steps.docs.outputs.site_dir }}
- name: Deploy Pages
uses: actions/deploy-pages@v4To enable benchmark history persistence ensure the branch (default bench-data) exists or the action can create it via a push using the provided token.
Python helper scripts now expose non-breaking CLI flags (env vars still work):
collect_metrics.py
collect_security.py
gen_metrics_md.py / gen_security_md.py
Snapshots are validated against JSON schemas in schema/. Failures:
| Symptom | Cause | Resolution |
|---|---|---|
| Missing reference docs | go doc invocation failed | Ensure Go toolchain (Go) is installed and on PATH |
| No complexity column | gocyclo not installed | Install gocyclo (go install github.com/fzipp/gocyclo/cmd/gocyclo@latest) |
| Security snapshot empty | Repo private without proper token scopes | Provide a token with security_events: read or use default GITHUB_TOKEN with proper permissions |
| Pagination not aggregating | Custom self-hosted GitHub or test harness | Use --api-base or SECURITY_API_BASE to point scripts at the correct root |
| Schema validation exit 2 | Output shape mismatch | Inspect logged JSON, update scripts or schemas accordingly |
| Benchmarks page missing previously | (Historical) no placeholder | Now always generated even without data |
| Go tests fail and action stops | Non-zero exit aborted earlier version | Action now logs a warning and continues building site |
| Need raw test output | Test summaries lost | See site_src/tests.txt for persisted test output |
| History (bench/metrics) not updating | History branch absent | Create branch (default bench-data) or ignore; action now skips silently |
Node tests (charts rendering):
npm testPython tests (metrics, security, trends, pagination):
pytest -qInstall Python dev deps locally:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements-dev.txtAll new additions (schemas, tests) follow the existing repository license. If contributing external schema changes ensure compatibility with the project license.
| Back | FazBrowse Home | New Git URL |