Commit 7045674 1 parent 6c041ad commit 7045674 Copy full SHA for 7045674
File tree 1 file changed +57
-0
lines changed
1 file changed +57
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and Deploy Documentation
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ - qy/create-docs
8
+
9
+ permissions :
10
+ contents : write
11
+
12
+ jobs :
13
+ build-and-deploy :
14
+ runs-on : ubuntu-latest
15
+
16
+ steps :
17
+ # Checkout the repository
18
+ - name : Checkout Code
19
+ uses : actions/checkout@v4
20
+
21
+ # Configure Git credentials
22
+ - name : Configure Git Credentials
23
+ run : |
24
+ git config user.name "github-actions[bot]"
25
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
26
+
27
+ # Set up Python
28
+ - name : Set up Python
29
+ uses : actions/setup-python@v5
30
+ with :
31
+ python-version : " 3.x"
32
+
33
+ # Generate cache ID
34
+ - name : Set Cache ID
35
+ run : echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
36
+
37
+ # Cache Python dependencies
38
+ - name : Cache Python Dependencies
39
+ uses : actions/cache@v4
40
+ with :
41
+ key : mkdocs-material-${{ env.cache_id }}
42
+ path : .cache
43
+ restore-keys : |
44
+ mkdocs-material-
45
+
46
+ # Install MkDocs and Plugins, Deploy Documentation
47
+ - name : Install Dependencies and Deploy Docs
48
+ run : |
49
+ pip install mkdocs-material \
50
+ mkdocs-git-revision-date-localized-plugin \
51
+ mkdocs-git-committers-plugin-2 \
52
+ mkdocs-autorefs \
53
+ mkdocstrings[python] \
54
+ markdown-exec
55
+ mkdocs gh-deploy --force
56
+ env :
57
+ MKDOCS_GIT_COMMITTERS_APIKEY : ${{ secrets.MKDOCS_GIT_COMMITTERS_APIKEY }}
You can’t perform that action at this time.
0 commit comments