Full review of the Getting Started doc (#94) #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: merge-main | |
concurrency: | |
group: merge-main | |
cancel-in-progress: true | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
# Build the documentation and publish to Github Pages | |
publish-docs: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Build docs | |
shell: bash | |
run: | | |
# Install dependencies and build the HTML docs | |
pip install .[dev] | |
cd docs | |
make clean html | |
# Compress for archival | |
cd _build/html | |
tar -cvjf ../../docs.tbz ./* | |
- name: Archive docs | |
id: archive | |
uses: actions/upload-artifact@v4 | |
with: | |
name: docs | |
path: docs.tbz | |
# This publishes the built docs into a special git branch which we tell Github to use with Github Pages | |
- name: Publish docs | |
uses: peaceiris/actions-gh-pages@v3 | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
with: | |
publish_branch: gh-pages # this is the default, but let's be explicit | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: docs/_build/html/ | |
force_orphan: true |