Skip to content

BDRSPS-1144 Re-usable Sites schema and validation changes #566

BDRSPS-1144 Re-usable Sites schema and validation changes

BDRSPS-1144 Re-usable Sites schema and validation changes #566

Workflow file for this run

name: Documentation
on:
release:
types:
- published
- deleted
push:
branches:
- main
- 'release/**'
pull_request:
branches:
- main
- 'release/**'
permissions:
contents: write
env:
PYTHON_VERSION: "3.11"
POETRY_VERSION: "1.8.5"
jobs:
documentation:
env:
DOCS_BRANCH: docs-site
runs-on: ubuntu-latest
steps:
- name: Checkout ${{ env.DOCS_BRANCH }}
uses: actions/checkout@v4
with:
ref: ${{ env.DOCS_BRANCH }}
- uses: actions/checkout@v4
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: ./.github/actions/setup-python-and-dependencies
with:
python-version: ${{ env.PYTHON_VERSION }}
poetry-version: ${{ env.POETRY_VERSION }}
- name: Generate markdown
run: poetry run poe generate-instructions
- name: Build and deploy dev documentation
if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
run: poetry run mike deploy --push --branch=${{ env.DOCS_BRANCH }} dev
- name: Build and deploy published tag documentation
if: ${{ github.event_name == 'release' && github.event.action == 'published' }}
run: |
echo "Creating documentation version ${{ github.ref_name }}"
poetry run mike deploy --push --branch=${{ env.DOCS_BRANCH }} --update-aliases ${{ github.ref_name }} latest
poetry run mike set-default --push --branch=${{ env.DOCS_BRANCH }} latest
- name: Remove deleted tag documentation
if: ${{ github.event_name == 'release' && github.event.action == 'deleted' }}
run: |
echo "Deleting documentation version ${{ github.ref_name }}"
poetry run mike delete --push --branch=${{ env.DOCS_BRANCH }} ${{ github.ref_name }}
- name: Build documentation for pull request
if: ${{ github.event_name == 'pull_request' }}
run: poetry run mkdocs build