docs: fix docs configuration #180
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: Deploy docs to Pages | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: build docs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- run: npm ci | |
working-directory: static | |
- run: npm run build | |
working-directory: static | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: Install deps | |
run: python -m pip install -r requirements.txt | |
- name: Install theme | |
run: python -m pip install . | |
- name: Build docs | |
run: sphinx-build docs _site -b dirhtml | |
env: | |
USE_DOCSEARCH: True | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |