From 078c52aa50eb1dabb1d8ce6b4328d96965219c1a Mon Sep 17 00:00:00 2001 From: Jesse Alama Date: Sun, 26 Oct 2025 11:34:24 +0100 Subject: [PATCH 1/2] feat: use docgen-action for documentation generation Adds a GitHub Actions workflow that uses leanprover-community/docgen-action to build and deploy documentation. Closes #121 --- .github/workflows/docs.yml | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..43f683c6 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,41 @@ +name: Build and Deploy Documentation + +on: + push: + branches: + - main + pull_request: + workflow_dispatch: + schedule: + # Run every 12 hours to keep docs up to date + - cron: '0 */12 * * *' + +permissions: + contents: read + id-token: write + pages: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout project + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Verify docs/lean-toolchain matches root + if: github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref == 'refs/heads/main') + run: | + set -e + cmp -s lean-toolchain docs/lean-toolchain + + - name: Build and lint the project + id: build-lean + uses: leanprover/lean-action@v1 + with: + build-args: "--wfail" + + - name: Build project documentation + id: build-docgen + uses: leanprover-community/docgen-action@main From a66e6f7bf322924d08b3505981574e44422d3ee9 Mon Sep 17 00:00:00 2001 From: Jesse Alama Date: Sun, 26 Oct 2025 15:01:31 +0100 Subject: [PATCH 2/2] fix: address PR feedback on docs workflow - Remove pull_request trigger to prevent running on PRs - Remove cron schedule (superseded by push to main) - Remove duplicate toolchain verification (handled by docgen-action) --- .github/workflows/docs.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 43f683c6..925475af 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -3,12 +3,8 @@ name: Build and Deploy Documentation on: push: branches: - - main - pull_request: + - main # Build docs on merges to main workflow_dispatch: - schedule: - # Run every 12 hours to keep docs up to date - - cron: '0 */12 * * *' permissions: contents: read @@ -24,12 +20,6 @@ jobs: with: fetch-depth: 0 - - name: Verify docs/lean-toolchain matches root - if: github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref == 'refs/heads/main') - run: | - set -e - cmp -s lean-toolchain docs/lean-toolchain - - name: Build and lint the project id: build-lean uses: leanprover/lean-action@v1