.github/workflows/main.yml #2
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: Deploy Sphinx documentation to Pages | |
on: | |
push: | |
branches: [master] # branch to trigger deployment | |
workflow_dispatch: | |
jobs: | |
pages: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install sphinx sphinx_rtd_theme | |
- name: Build documentation | |
run: | | |
sphinx-build -b html docs/ build/ | |
- id: deployment | |
uses: sphinx-notes/pages@v3 | |
with: | |
publish: false | |
- uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: build |