Skip to content

Commit 74a6816

Browse files
committed
ci: refactor deploy_docs workflow
1 parent f4f6003 commit 74a6816

File tree

1 file changed

+36
-13
lines changed

1 file changed

+36
-13
lines changed

.github/workflows/deploy_docs.yml

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,47 @@
1-
name: Publish docs via GitHub Pages
1+
name: Deploy Documentation
2+
23
on:
34
push:
4-
branches:
5-
- main
6-
workflow_dispatch:
5+
branches: [ main ]
76

87
permissions:
98
contents: read
109
pages: write
1110
id-token: write
1211

12+
concurrency:
13+
group: "pages"
14+
cancel-in-progress: false
15+
1316
jobs:
14-
build:
15-
name: Deploy docs
17+
deploy:
18+
environment:
19+
name: github-pages
20+
url: ${{ steps.deployment.outputs.page_url }}
1621
runs-on: ubuntu-latest
1722
steps:
18-
- name: Checkout main
19-
uses: actions/checkout@v2
20-
21-
- name: Deploy docs
22-
uses: mhausenblas/mkdocs-deploy-gh-pages@master
23-
env:
24-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- name: Setup Python
27+
uses: actions/setup-python@v4
28+
with:
29+
python-version: 3.x
30+
31+
- name: Install dependencies
32+
run: pip install mkdocs-material
33+
34+
- name: Build documentation
35+
run: mkdocs build
36+
37+
- name: Setup Pages
38+
uses: actions/configure-pages@v4
39+
40+
- name: Upload artifact
41+
uses: actions/upload-pages-artifact@v3
42+
with:
43+
path: './site'
44+
45+
- name: Deploy to GitHub Pages
46+
id: deployment
47+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)