Skip to content

cd: update workflow

cd: update workflow #3

Workflow file for this run

name: Build & deploy sphinx document
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build-deploy:
name: Build & deploy sphinx document
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install Dependencies
run: |
python -m pip install sphinx sphinx_rtd_theme nbsphinx
python -m pip install .
- name: Run build command
run: |
sphinx-apidoc -o ./docs/source ./tangelo
sphinx-build -M html ./docs/source ./docs/build -E
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build/html
force_orphan: true
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'