Repository navigation
ci: update docs publishing using myst-version-switcher-plugin #1294
This file contains hidden or 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: 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.28.0 | |
| with: | |
| # Some of the docs need graphviz, so install it as well as running sphinx | |
| build-command: sudo apt-get install -y graphviz && uv run --locked tox -e docs | |
| html-dir: build/html | |
| 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] | |
| if: github.ref_type == 'tag' # tag pushes only | |
| uses: DiamondLightSource/myst-version-switcher-plugin/.github/workflows/release.yml@v0.28.0 | |
| permissions: | |
| contents: write # create the Release + attach assets |