docs #145
This file contains 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: | ||
workflow_run: | ||
workflows: ["tests"] | ||
branches: | ||
- main | ||
types: | ||
- completed | ||
jobs: | ||
pages: | ||
runs-on: ubuntu-latest | ||
# Only if tests have passed, not just if the tests workflow ran. | ||
if: ${{ github.event.workflow_run.conclusion == "success" }} | ||
Check failure on line 16 in .github/workflows/gh-pages.yml GitHub Actions / docsInvalid workflow file
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
- name: pysetup | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
- name: build | ||
run: | | ||
# sphinx-autodoc needs target package to be installed | ||
##pip install -e ".[doc]" | ||
pip install -e . | ||
# See doc/requirements.txt for why we can't use | ||
# pip install -e ".[doc]" | ||
pip install -r doc/requirements.txt | ||
cd doc | ||
sh generate-doc.sh | ||
- name: deploy | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
# base dir is checkout: /path/to/psweep | ||
publish_dir: doc/source/_build/html |