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