chore: do not require docs #149
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: build and deploy docs | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| build: | |
| name: build docs | |
| 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 | |
| - name: build doc-gen4 | |
| run: | | |
| env DISABLE_EQUATIONS=1 lake build doc-gen4 | |
| - name: build import graph | |
| run: | | |
| lake exe graph algorithm.html | |
| - name: generate docs | |
| run: | | |
| lake build Algorithm:docs | |
| lake build Algorithm:docsHeader | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: './docbuild/.lake/build/doc' | |
| deploy: | |
| if: github.ref == 'refs/heads/master' | |
| name: deploy docs | |
| runs-on: ubuntu-latest | |
| needs: build | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| uses: actions/deploy-pages@v4 |