

feat: add CI workflow for publishing docs
@8c7faf9168f8e7efa8c92775db70525c1ca4abdd
+++ .github/workflows/publish-docs.yaml
... | ... | @@ -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 |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?