functions a bit more dynamic #1419
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: Docs | |
| on: [push, pull_request, workflow_dispatch] | |
| permissions: | |
| contents: write | |
| jobs: | |
| docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get install pandoc | |
| python -m pip install --upgrade pip | |
| pip install poetry | |
| poetry config virtualenvs.in-project true | |
| poetry install | |
| - name: Write documentation | |
| run: | | |
| poetry run pandoc -f gfm -t rst --wrap=none README.md -o doc/README.rst --filter doc/path_adjust_filter.py | |
| poetry run sphinx-apidoc -o doc ./ | |
| poetry run sphinx-build doc _build -va | |
| - name: Deploy | |
| if: github.ref == 'refs/heads/main' | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| publish_branch: gh-pages | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: _build/ | |
| force_orphan: true | |
| cname: cybench.agml.org |