Skip to content

ci: improve tests_local workflow #56

ci: improve tests_local workflow

ci: improve tests_local workflow #56

# yamllint disable
name: build_documentation
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
build-documentation:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- name: Create Python environment
id: environment
uses: ./.github/actions/create_python_environment
- name: Sphinx build
env:
PYTHON_PACKAGE_MANAGER: ${{steps.environment.outputs.ppm}}
run: |
$PYTHON_PACKAGE_MANAGER activate queens
sphinx-apidoc -o doc/source queens -f -M
cd doc
sphinx-build -b html -d build/doctrees source build/html
- name: Upload html
uses: actions/upload-pages-artifact@v3
with:
path: doc/build/html
retention-days: 1
deploy-documentation:
needs: build-documentation
if: ${{github.ref == 'refs/heads/main'}}
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4