Skip to content

Add GH Action to publish docs #1

Add GH Action to publish docs

Add GH Action to publish docs #1

Workflow file for this run

name: Publish Docs Only
permissions:
contents: read
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "publish"
cancel-in-progress: false
jobs:
# Docs must pass before SDK publish to PyPI. The publish docs task
# depends on the PyPI publish task, so check docs build OK before
# trying publishing to PyPI, then OK to publish docs themselves.
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pipx install poetry
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
run: poetry install --with dev,docs
- name: Build project documentation
uses: ./.github/actions/docsbuild
publish-docs:
needs:
- docs
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
permissions:
# Sets permissions of the GITHUB_TOKEN to allow deployment of Sphinx Docs to GitHub Pages
contents: read
pages: write
id-token: write
steps:
- uses: actions/checkout@v4
- run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Build project documentation
uses: ./.github/actions/docsbuild
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'docs/build/html'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4