Merge pull request #144 from mechmotum/initial-release #233
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
# Based of: https://github.com/eeholmes/readthedoc-test | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
deploy_docs_job: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install pandoc | |
run: | | |
sudo apt-get update | |
sudo apt-get install pandoc | |
- name: Create the tutorials' environment | |
uses: mamba-org/setup-micromamba@v2 | |
with: | |
environment-file: docs/tutorials/tutorials_environment.yml | |
init-shell: >- | |
bash | |
powershell | |
cache-environment: true | |
post-cleanup: 'all' | |
- name: Deactivate the tutorials environment | |
run: | | |
source /usr/share/miniconda/etc/profile.d/conda.sh | |
conda deactivate | |
- name: Install poetry | |
run: pipx install poetry==1.8.3 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Install dependencies | |
run: poetry install --with docs --all-extras | |
- name: make the sphinx docs | |
run: | | |
poetry run make -C docs clean | |
poetry run make -C docs html | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v4 | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
with: | |
publish_branch: gh-pages | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: docs/_build/html | |
force_orphan: true |