-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.28 KB
/
release.yaml
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
name: Publish MkDocs
on:
pull_request:
push:
branches:
- master
release:
types:
- created
jobs:
build:
name: Publish documentation
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Configure Git
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
git fetch origin gh-pages:gh-pages
- name: Dry run
if: github.event_name == 'pull_request'
run: |
mkdocs build
- name: Upload and tag as latest
if: github.ref == 'refs/heads/master'
run: |
mike deploy --push latest
mike set-default --push latest
- name: Upload and tag as git tag
if: github.event_name == 'release' && github.event.action == 'created'
run: |
mike deploy --push ${{ github.ref_name }}
mike set-default --push latest