-
Notifications
You must be signed in to change notification settings - Fork 149
41 lines (41 loc) · 1.12 KB
/
build_docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
name: Deploy Documentation
on:
workflow_dispatch:
release:
types: [published]
push:
paths:
- "docs/**"
- mkdocs.yml
branches:
- main
jobs:
deploy:
name: Deploy Documentation
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout main
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: true
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install Dependencies
run: |
pip install -r docs/requirements.txt
- name: Configure Git User
# Required by mike for the commit it does to the gh-pages branch
run: |
git config user.name "ci-docs"
git config user.email "[email protected]"
- name: Deploy the latest documents from new release
if: ${{ github.event_name == 'release' }}
run: mike deploy --push --update-aliases "${GITHUB_REF#refs/*/}" latest
- name: Deploy the development docs
if: ${{ github.event_name != 'release' }}
run: mike deploy --push unreleased