maybe now #5
Workflow file for this run
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: Docs | |
on: [push, pull_request, workflow_dispatch] | |
permissions: | |
contents: write | |
jobs: | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
- name: Setup gh_pages folder | |
if: ${{ github.event_name == 'push' }} | |
run: | | |
set -x | |
git fetch | |
( git branch gh_pages remotes/origin/gh_pages && git clone . --branch=gh_pages _gh-pages/ ) || mkdir _gh_pages | |
rm -rf _gh_pages/.git/ | |
mkdir -p _gh_pages/branch/ | |
- name: Install dependencies | |
run: | | |
pip install -r docs/requirements.txt | |
- name: Build documentation | |
run: | | |
cd docs | |
make html | |
rsync build/html _gh_pages/ | |
# Add the .nojekyll file | |
- name: nojekyll | |
if: ${{ github.event_name == 'push' }} | |
run: | | |
touch _gh_pages/.nojekyll | |
# Deploy | |
# https://github.com/peaceiris/actions-gh-pages | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
if: ${{ github.event_name == 'push' }} | |
with: | |
publish_branch: gh-pages | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: _gh_pages/ | |
force_orphan: true |