chore: do not require docs #1
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: Pages CI | |
| on: | |
| push: | |
| branches: ["master"] | |
| pull_request: | |
| workflow_dispatch: | |
| # Bestows GITHUB_TOKEN permission to deploy to GitHub Pages | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - id: lean-action | |
| uses: leanprover/lean-action@v1 | |
| with: | |
| use-github-cache: false | |
| - name: Build Doc | |
| run: | | |
| cd docbuild | |
| MATHLIB_NO_CACHE_ON_UPDATE=1 lake update doc-gen4 CombinatorialGames | |
| lake build CombinatorialGames:docs | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: './docbuild/.lake/build/doc' | |
| deploy: | |
| needs: build | |
| if: github.event_name != 'pull_request' | |
| # Allow only one maximum concurrent deployment to prevent previous updates | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: true | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |