bounded elliot #61
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] | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Check if release | |
id: setup | |
run: | | |
echo "IS_RELEASE=${{ | |
github.event_name == 'push' && github.ref == 'refs/heads/main' | |
}}" >> $GITHUB_OUTPUT | |
- uses: actions/checkout@v4 | |
- name: Upgrade jinja | |
run: pip install -U jinja2 | |
- name: Install Python dependencies | |
run: pip install -r requirements-doc.txt | |
- name: Build | |
run: | | |
if [ "${{ steps.setup.outputs.IS_RELEASE }}" == "true" ]; then | |
O="-t release" | |
fi | |
make html O="$O" | |
- name: Publish | |
if: ${{ steps.setup.outputs.IS_RELEASE == 'true' }} | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./_build/html | |
force_orphan: true |