-
Notifications
You must be signed in to change notification settings - Fork 64
47 lines (45 loc) · 1.26 KB
/
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
42
43
44
45
46
47
name: docs
on:
workflow_dispatch:
push:
branches:
- main
paths:
- docs/**
pull_request:
types: [opened, synchronize, reopened]
paths:
- docs/**
jobs:
build:
runs-on: ubuntu-latest
if: github.event.repository.fork == false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install python3
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Cache
uses: actions/cache@v3
with:
key: ${{ github.ref }}
path: .cache
- name: Install Material for MkDocs
run: |
pip install mkdocs-material pillow cairosvg
pip install -r docs/mkdocs-material-plugins.txt
- name: Build
run: cd docs && mkdocs build --clean --config-file mkdocs.yaml -d site -v
- name: Publish main
if: github.ref == 'refs/heads/main'
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs/site
- name: Publish version
if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, 'beta') && !contains(github.ref, 'alpha')
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs/site
clean-exclude: dokka/**