Revert "fix: removing GH Token (not needed)" #40
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: Build and Deploy Documentation | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-deploy-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Fetch all history for .git-restore-mtime to work correctly | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install .[docs] | |
- name: Build MkDocs site (general documentation) | |
run: mkdocs build --config-file mkdocs.yml --site-dir ./site | |
- name: Build Sphinx docs (api documentation) | |
run: | | |
sphinx-build -b html docs/api site/api | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./site | |
force_orphan: true |