Skip to content

Commit 5393939

Browse files
authored
Use gh actions for docs (#21)
1 parent 1bbeebe commit 5393939

2 files changed

Lines changed: 26 additions & 9 deletions

File tree

.github/workflows/deploy-docs.yml

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,43 @@ on:
33
push:
44
branches:
55
- main
6+
paths:
7+
- 'docs/**'
8+
- 'mkdocs.yml'
9+
workflow_dispatch:
610
permissions:
7-
contents: write
11+
contents: read
12+
pages: write
13+
id-token: write
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
817
jobs:
9-
deploy:
18+
build:
1019
runs-on: ubuntu-latest
1120
steps:
1221
- uses: actions/checkout@v4
13-
- uses: actions/setup-python@v4
22+
- uses: actions/setup-python@v5
1423
with:
1524
python-version: 3.x
1625
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
17-
- uses: actions/cache@v3
26+
- uses: actions/cache@v4
1827
with:
1928
key: mkdocs-material-${{ env.cache_id }}
2029
path: .cache
2130
restore-keys: |
2231
mkdocs-material-
2332
- run: pip install mkdocs-material
24-
- run: make docs-deploy
33+
- run: mkdocs build
34+
- uses: actions/upload-pages-artifact@v3
35+
with:
36+
path: site
37+
deploy:
38+
environment:
39+
name: github-pages
40+
url: ${{ steps.deployment.outputs.page_url }}
41+
runs-on: ubuntu-latest
42+
needs: build
43+
steps:
44+
- uses: actions/deploy-pages@v4
45+
id: deployment

Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,3 @@ docs-install:
106106
@PHONY: docs-serve
107107
docs-serve:
108108
@mkdocs serve
109-
110-
@PHONY: docs-deploy
111-
docs-deploy:
112-
@mkdocs gh-deploy --force

0 commit comments

Comments
 (0)