Skip to content

ci: update docs publishing using myst-version-switcher-plugin #1204

ci: update docs publishing using myst-version-switcher-plugin

ci: update docs publishing using myst-version-switcher-plugin #1204

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [main]
tags: ["*"] # '*' never matches '/', so e.g. release/x tags don't build
jobs:
lint:
uses: ./.github/workflows/_tox.yml
with:
tox: pre-commit
test:
uses: ./.github/workflows/_test.yml
with:
runs-on: ubuntu-latest
docs: # Call the docs building workflow directly
uses: DiamondLightSource/myst-version-switcher-plugin/.github/workflows/docs.yml@v0.24.1
with:
# Whatever turns your sources into docs/_build/html at $BASE_URL. uv and Node
# are preinstalled; so: make docs · tox -e docs · npm ci && npm run docs
build-command: uv run --locked tox -e docs
html-dir: build/html
dist:
uses: ./.github/workflows/_dist.yml
example:
needs: test
if: github.ref_name == 'main'
uses: ./.github/workflows/_example.yml
secrets:
EXAMPLE_DEPLOY_KEY: ${{ secrets.EXAMPLE_DEPLOY_KEY }}
release:
needs: [test, docs, dist]
if: github.ref_type == 'tag' # tag pushes only
uses: DiamondLightSource/myst-version-switcher-plugin/.github/workflows/release.yml@v0.24.1
permissions:
contents: write # create the Release + attach assets
publish:
needs: [docs]
# don't publish a pages site in the fork's org
if: github.repository == 'DiamondLightSource/python-copier-template' && github.ref_type == 'tag' # publish only on tags
uses: ./.github/workflows/publish-dispatch.yml # your workflow (below)
with:
version-name: ${{ needs.docs.outputs.version-name }}
permissions:
contents: read
actions: write
pages: write
id-token: write
statuses: write