Skip to content

Commit 32cd62a

Browse files
committed
Add github actions workflow to publish gh-pages
1 parent 665673a commit 32cd62a

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Publish MkDocs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
# This is necessary for the gh-deploy command to push to the gh-pages branch.
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
deploy:
14+
name: Deploy MkDocs Site
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Configure Git User
22+
run: |
23+
git config user.name "github-actions"
24+
git config user.email "github-actions@github.com"
25+
26+
- name: Set up Python
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: '3.12'
30+
31+
- name: Install dependencies
32+
run: |
33+
pip install --upgrade pip
34+
pip install poetry
35+
poetry install --no-interaction --no-root
36+
37+
- name: Deploy to GitHub Pages
38+
run: poetry run mkdocs gh-deploy --force
39+

0 commit comments

Comments
 (0)