-
Notifications
You must be signed in to change notification settings - Fork 53
40 lines (39 loc) · 1.04 KB
/
Copy pathmkdocs.yaml
File metadata and controls
40 lines (39 loc) · 1.04 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
name: mkdocs
on:
push:
branches:
- main
pull_request:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
# git-revision-date-localized reads commit history; a shallow clone
# makes it warn, which --strict would treat as a failure.
fetch-depth: 0
- uses: actions/setup-python@v7
with:
python-version: 3.x
- run: pip install mkdocs-material
- run: pip install mkdocs-git-revision-date-localized-plugin
- run: mkdocs build --strict
deploy:
needs: build
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: 3.x
- uses: actions/cache@v6
with:
key: ${{ github.ref }}
path: .cache
- run: pip install mkdocs-material
- run: pip install mkdocs-git-revision-date-localized-plugin
- run: mkdocs gh-deploy --force