test: test initialized enumerator documentation #148
This file contains 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: Build and Deploy Documentation | |
on: | |
push: | |
branches: | |
- 'master' | |
jobs: | |
build-docs: | |
name: Build Documentation | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- ref: master | |
name: dev | |
- ref: v0.14.0 | |
name: stable | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ matrix.ref }} | |
- name: Install dependencies (apt) | |
run: sudo apt-get install -y python3-clang python3-pip | |
- name: Build docs | |
run: | | |
. venv | |
sphinx-build doc _build | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.name }} | |
path: _build | |
if-no-files-found: error | |
deploy-docs: | |
name: Deploy Documentation | |
runs-on: ubuntu-latest | |
needs: build-docs | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{steps.deployment.outputs.page_url}} | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
path: . | |
- name: Add redirect to stable documentation | |
run: echo '<meta http-equiv="refresh" content="0; url=stable" />' > index.html | |
- run: find | |
- uses: actions/configure-pages@v3 | |
- uses: actions/upload-pages-artifact@v1 | |
with: | |
path: . | |
- id: deployment | |
uses: actions/deploy-pages@v1 |