Skip to content

Commit fcc6520

Browse files
committed
ci(docs): mkdocs gh-deploy
1 parent 6c041ad commit fcc6520

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Docs Build and Publish
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- qy/create-docs
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
deploy:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
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+
22+
- uses: actions/setup-python@v5
23+
with:
24+
python-version: 3.x
25+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
26+
27+
- uses: actions/cache@v4
28+
with:
29+
key: mkdocs-material-${{ env.cache_id }}
30+
path: .cache
31+
restore-keys: |
32+
mkdocs-material-
33+
run: |
34+
conda activate plant-seg
35+
pip install mkdocs-material \
36+
mkdocs-git-revision-date-localized-plugin \
37+
mkdocs-git-committers-plugin-2 \
38+
mkdocs-autorefs \
39+
mkdocstrings[python] \
40+
markdown-exec
41+
mkdocs gh-deploy --force
42+
env:
43+
MKDOCS_GIT_COMMITTERS_APIKEY: ${{ secrets.MKDOCS_GIT_COMMITTERS_APIKEY }}

0 commit comments

Comments
 (0)