-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (42 loc) · 1.23 KB
/
docs.yml
File metadata and controls
52 lines (42 loc) · 1.23 KB
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
42
43
44
45
46
47
48
49
50
51
52
name: Deploy Documentation
on:
push:
branches: [master]
paths:
- 'docs/**'
- 'mkdocs.yml'
- 'src/**'
workflow_dispatch:
inputs:
bootstrap:
description: 'Wipe gh-pages before deploying (one-time when migrating from mkdocs gh-deploy to mike)'
type: boolean
default: false
permissions:
contents: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install docs dependencies
run: pip install -e ".[docs]"
- name: Configure git for mike
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Fetch gh-pages
run: git fetch origin gh-pages --depth=1 || true
- name: Bootstrap gh-pages (wipe old flat-deploy content)
if: ${{ inputs.bootstrap == true }}
run: mike delete --all --push --allow-empty
- name: Deploy dev docs with mike
run: mike deploy --push --update-aliases dev