Skip to content

Commit 03eff0b

Browse files
authored
Manage deployment entirely via Github Action
1 parent e5c7e1b commit 03eff0b

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Deploy Mkdocs to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
- name: Setup Pages
24+
uses: actions/configure-pages@v5
25+
- uses: actions/setup-python@v5
26+
with:
27+
python-version: 3.x
28+
- name: Install dependencies
29+
run: pip install -r requirements.txt
30+
- name: Build mkdocs
31+
run: mkdocs build --clean --verbose --site-dir _site
32+
- name: Upload artifact
33+
uses: actions/upload-pages-artifact@v3
34+
35+
deploy:
36+
environment:
37+
name: github-pages
38+
url: ${{ steps.deployment.outputs.page_url }}
39+
runs-on: ubuntu-latest
40+
needs: build
41+
steps:
42+
- name: Deploy to GitHub Pages
43+
id: deployment
44+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)