-
-
Notifications
You must be signed in to change notification settings - Fork 34
60 lines (60 loc) · 1.8 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
48
49
50
51
52
53
54
55
56
57
58
59
60
name: docs
on:
push:
branches-ignore:
- "github-pages"
pull_request: {}
env:
# renovate: datasource=docker depName=squidfunk/mkdocs-material
MKDOCS_MATERIAL_VERSION: "9.5.15"
# renovate: datasource=pypi depName=mkdocs-awesome-pages-plugin
MKDOCS_AWESOME_PAGES_PLUGIN_VERSION: "2.8.0"
jobs:
changes:
runs-on: ubuntu-latest
outputs:
md: ${{ steps.filter.outputs.md }}
config: ${{ steps.filter.outputs.config }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v3
id: filter
with:
token: ${{ secrets.GITHUB_TOKEN }}
filters: |
md:
- '**/*.md'
config:
- '.github/workflows/docs.yml'
- 'mkdocs.yml'
docs-build:
if: |
(needs.changes.outputs.md == 'true') ||
(needs.changes.outputs.config == 'true')
runs-on: ubuntu-latest
needs:
- changes
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: pip install mkdocs-material==${{ env.MKDOCS_MATERIAL_VERSION }}
- run: pip install mkdocs-awesome-pages-plugin==${{ env.MKDOCS_AWESOME_PAGES_PLUGIN_VERSION }}
- run: mkdocs build
docs-deploy:
needs:
- docs-build
- changes
if: |
((needs.changes.outputs.md == 'true') || (needs.changes.outputs.config == 'true')) &&
(github.ref == 'refs/heads/master')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: pip install mkdocs-material==${{ env.MKDOCS_MATERIAL_VERSION }}
- run: pip install mkdocs-awesome-pages-plugin==${{ env.MKDOCS_AWESOME_PAGES_PLUGIN_VERSION }}
- run: mkdocs gh-deploy --force