Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Untrack private handoff; sync docs to post-freeze public state #42

Untrack private handoff; sync docs to post-freeze public state

Untrack private handoff; sync docs to post-freeze public state #42

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Verify content hashes
run: ./scripts/validate-hashes.sh
- name: Validate cross-references
run: node scripts/validate.js
- name: Build site
run: npm run build
- uses: actions/checkout@v4
with:
repository: snapsynapse/obligation-first
path: obligation-first
- name: Validate Obligation-First binding
run: OBLIGATION_FIRST_DIR="$PWD/obligation-first" npm run validate:of
- name: Verify docs/ is up to date with sources
run: |
# Exclude paths that embed a build timestamp (non-deterministic on each build).
# Tracked upstream: KaC build.js emits `meta.generated` in api/*.json and pubDate in feed.xml.
if ! git diff --quiet -- docs/ ':(exclude)docs/api/*.json' ':(exclude)docs/feed.xml' ':(exclude)docs/sitemap.xml'; then
echo "::error::docs/ is out of sync with sources. Run 'npm run build' locally and commit the result."
git status -- docs/
git diff --stat -- docs/ ':(exclude)docs/api/*.json' ':(exclude)docs/feed.xml' ':(exclude)docs/sitemap.xml' | head -30
exit 1
fi
- name: Check internal links
run: node scripts/check-links.js
a11y:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Build site
run: npm run build
- name: Start local server
run: |
npx --yes http-server ./docs -p 8088 -c-1 > /tmp/http.log 2>&1 &
for i in $(seq 1 30); do
curl -fs http://localhost:8088/ > /dev/null && break || sleep 0.5
done
curl -fs http://localhost:8088/ > /dev/null || (cat /tmp/http.log; exit 1)
- name: Run pa11y-ci (WCAG 2.1 AA)
run: |
npx --yes pa11y-ci \
--config .pa11yci.json \
--sitemap http://localhost:8088/sitemap.xml \
--sitemap-find 'https://publedge.org' \
--sitemap-replace 'http://localhost:8088' \
--sitemap-exclude '\.(md|yaml|json|jsonld|ttl|xml|txt)$'
# GitHub Pages serves from main /docs. The build job ensures docs/ stays
# in sync with sources; the a11y job runs a WCAG 2.1 AA pass on every
# push and pull request against every URL in sitemap.xml.