Update docs.yml #26
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: | |
push: | |
branches: | |
- main # Change to your default branch | |
- docs | |
pull_request: | |
branches: | |
- main # Optional: build on pull requests to the main branch | |
- docs | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: check out | |
uses: actions/checkout@v3 | |
with: | |
ref: docs | |
- uses: actions/setup-python@v4 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install sphinx sphinx_rtd_theme | |
- name: Generate .rst files using sphinx-apidoc | |
working-directory: ./docs | |
run: sphinx-apidoc -o . ../src/aviary | |
- name: Clean previous builds | |
working-directory: ./docs | |
run: make clean | |
- name: Build the Sphinx documentation | |
working-directory: ./docs | |
run: make html | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_branch: gh-pages | |
publish_dir: docs/_build/html |