File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy docs
2
+ on :
3
+ workflow_dispatch :
4
+ push :
5
+ branches :
6
+ - ' master'
7
+ pull_request :
8
+ permissions :
9
+ contents : write
10
+ jobs :
11
+ deploy :
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - name : Checkout repo
15
+ uses : actions/checkout@v4
16
+
17
+ - name : Configure Git Credentials
18
+ run : |
19
+ git config user.name github-actions[bot]
20
+ git config user.email 41898282+github-actions[bot]@users.noreply.github.com
21
+ if : (github.event_name != 'pull_request')
22
+
23
+ - name : Set up Python 3.9
24
+ uses : actions/setup-python@v5
25
+ with :
26
+ python-version : ' 3.9'
27
+ cache : ' pip'
28
+ cache-dependency-path : |
29
+ setup.py
30
+ requirements-docs.txt
31
+
32
+ - name : Save time for cache for mkdocs
33
+ run : echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
34
+
35
+ - name : Caching
36
+ uses : actions/cache@v4
37
+ with :
38
+ key : mkdocs-material-${{ env.cache_id }}
39
+ path : .cache
40
+ restore-keys : |
41
+ mkdocs-material-
42
+
43
+ - name : Install Dependencies
44
+ run : pip install -r requirements-docs.txt
45
+
46
+ - name : Deploy to GitHub Pages
47
+ run : mkdocs gh-deploy --force
48
+ if : (github.event_name != 'pull_request')
49
+
50
+ - name : Build docs to check for errors
51
+ run : mkdocs build
52
+ if : (github.event_name == 'pull_request')
You can’t perform that action at this time.
0 commit comments