Fedir Zadniprovskyi commited on
Commit
4a7c975
·
1 Parent(s): 40d0a9e

feat: add CI workflow for publishing docs

Browse files
Files changed (1) hide show
  1. .github/workflows/publish-docs.yaml +34 -0
.github/workflows/publish-docs.yaml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # https://www.mkdocs.org/user-guide/deploying-your-docs/
2
+ # https://squidfunk.github.io/mkdocs-material/publishing-your-site/#with-github-actions
3
+ name: publish-docs
4
+ on:
5
+ workflow_dispatch:
6
+ push:
7
+ branches:
8
+ - master
9
+ permissions:
10
+ contents: write
11
+ jobs:
12
+ deploy:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ - name: Configure Git Credentials
17
+ run: |
18
+ git config user.name github-actions[bot]
19
+ git config user.email 41898282+github-actions[bot]@users.noreply.github.com
20
+ - uses: actions/checkout@v4
21
+ - uses: astral-sh/setup-uv@v5
22
+ with:
23
+ version: "0.4.11"
24
+ enable-cache: true
25
+ - run: uv python install 3.12
26
+ - run: uv sync --extra dev
27
+ - run: echo "cache_id=$(date --utc '+%V')" >> "$GITHUB_ENV"
28
+ - uses: actions/cache@v4
29
+ with:
30
+ key: mkdocs-material-${{ env.cache_id }}
31
+ path: .cache
32
+ restore-keys: |
33
+ mkdocs-material-
34
+ - run: mkdocs gh-deploy --force