This repository has been archived by the owner on Dec 16, 2024. It is now read-only.
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: Check the documentation build, publish if on main | |
on: | |
push: | |
# This way it only triggers on branch pushes, | |
# and ignores releases that push a tag. | |
tags-ignore: | |
- '**' | |
branches-ignore: | |
- github-pages/* | |
jobs: | |
create_github_pages_docs: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [3.8] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install poetry | |
uses: abatilo/actions-poetry@v2 | |
with: | |
poetry-version: 1.8.0 | |
- name: Poetry install | |
run: poetry install | |
- name: Deploy documentation to github-pages branch | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git fetch | |
poetry run nox -s "push-pages(target='current')" | |
- name: Cleanup delete target branch | |
if: ${{ !contains(github.ref, 'main') }} | |
run: git push -d origin "github-pages/"$(git branch --show-current)"" |