Add API docs to Strata website #8
Workflow file for this run
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: Deploy Documentation | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| deploy_doc: | |
| name: Deploy documentation | |
| runs-on: ubuntu-latest | |
| environment: github-pages | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build documentation package | |
| uses: leanprover/lean-action@v1 | |
| with: | |
| build-args: '--wfail' | |
| lake-package-directory: 'docs/verso' | |
| - name: Build API documentation | |
| uses: leanprover/lean-action@v1 | |
| with: | |
| build-args: 'Strata:docs StrataTest:docs' | |
| lake-package-directory: 'docs/api' | |
| - name: Debug API docs location | |
| run: | | |
| echo "Listing docs/api/.lake/build/doc:" | |
| ls -la docs/api/.lake/build/doc || echo "Not found at docs/api/.lake/build/doc" | |
| find docs/api -name "*.html" -type f | head -20 || echo "No HTML files found" | |
| - name: Build documentation | |
| run: ./generate.sh | |
| working-directory: docs/verso | |
| - name: Create documentation index | |
| run: | | |
| cp index.html _out/ | |
| cp ../../strata_logo.png _out/ | |
| working-directory: docs/verso | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: docs/verso/_out | |
| - name: Deploy to GitHub Pages | |
| uses: actions/deploy-pages@v4 |