Merge branch 'hotfix/docs-links' into main #25
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: Documentation | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
tags: '*' | |
pull_request: | |
# sphinx-build doc _build | |
permissions: | |
contents: write | |
jobs: | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: 'true' | |
fetch-depth: 0 | |
- uses: actions/setup-python@v3 | |
- name: Install dependencies | |
run: | | |
# pip install -r docs/requirements.txt | |
pip install -e .[docs] | |
- name: Sphinx Build Develop | |
run: | | |
git checkout develop | |
git fetch --all | |
git pull --all | |
cd ${{ github.workspace }}/docs | |
# make html | |
sphinx-multiversion source build/html | |
- name: Sphinx Build Main | |
run: | | |
git checkout main | |
cd ${{ github.workspace }}/docs | |
sphinx-multiversion source build/html | |
# - name: Make symlinks | |
# run: | | |
# ln -sf ${{ github.workspace }}/build/html/main ${{ github.workspace }}/build/html/stable | |
# ln -sf ${{ github.workspace }}/build/html/develop ${{ github.workspace }}/build/html/dev | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
if: ${{ github.event_name == 'push' && ((github.ref == 'refs/heads/main') || (github.ref == 'refs/heads/develop'))}} | |
with: | |
publish_branch: gh-pages | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
# publish_dir: docs/build/ | |
publish_dir: docs/build/html/ | |
# publish_dir: _build/ | |
# force_orphan: true |