Hotfix: try workspace cd #20
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: Prep Sphinx Build | |
run: | | |
git fetch --all | |
git pull --all | |
- name: Sphinx Build Develop | |
run: | | |
git checkout develop | |
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 build/html/main build/html/stable | |
ln -sf build/html/develop 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 |