Foundry Refactor #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: API Docs | |
| # The aragon/developer-portal site is Antora-based and PULLS this repo's | |
| # `docs/` tree (Antora playbook in that repo defines source repos + paths). | |
| # We don't push docs anywhere from CI — the auto-generated `.adoc` files | |
| # under `docs/modules/api/` are committed alongside contract changes. | |
| # | |
| # This workflow only validates that the committed docs are in sync with | |
| # the source. If a PR changes a contract but forgets to regenerate, CI | |
| # fails with a clear message telling the contributor to run `just build-docs`. | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| paths: | |
| - 'src/**' | |
| - 'scripts/build-docs.py' | |
| - 'foundry.toml' | |
| - 'remappings.txt' | |
| - 'docs/**' | |
| jobs: | |
| check_docs: | |
| name: API docs in sync | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| persist-credentials: false | |
| - name: Install Foundry | |
| uses: foundry-rs/foundry-toolchain@v1 | |
| with: | |
| version: v1.5.0 | |
| - name: Install just | |
| uses: extractions/setup-just@v2 | |
| - name: Build docs | |
| run: just build-docs | |
| - name: Verify docs are committed in sync | |
| run: | | |
| if ! git diff --exit-code -- docs/modules/api/; then | |
| echo "::error::Generated API docs are out of date." | |
| echo "::error::Run \`just build-docs\` locally and commit the diff." | |
| exit 1 | |
| fi |