Skip to content

Commit e73d47c

Browse files
committed
add action for docs deployment, poetry, etc
1 parent 323e0c3 commit e73d47c

File tree

4 files changed

+849
-0
lines changed

4 files changed

+849
-0
lines changed

.github/workflows/docs.yml

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Mkdocs site CI
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build:
20+
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
- name: Setup Pages
27+
uses: actions/configure-pages@v5
28+
29+
30+
- name: Upload artifact
31+
uses: actions/upload-pages-artifact@v3
32+
33+
- uses: actions/setup-python@v5
34+
with:
35+
python-version: "3.10"
36+
- name: Run image
37+
uses: abatilo/actions-poetry@v2
38+
with:
39+
poetry-version: "1.8.4"
40+
- name: Install deps
41+
run: poetry install
42+
- name: Build site
43+
run: poetry run mkdocs build -d _site
44+
45+
- uses: actions/checkout@v4
46+
- name: Build the site in the jekyll/builder container
47+
run: |
48+
docker run \
49+
-v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \
50+
jekyll/builder:latest /bin/bash -c "chmod -R 777 /srv/jekyll && jekyll build --future"
51+
52+
# Deployment job
53+
deploy:
54+
environment:
55+
name: github-pages
56+
url: ${{ steps.deployment.outputs.page_url }}
57+
runs-on: ubuntu-latest
58+
needs: build
59+
steps:
60+
- name: Deploy to GitHub Pages
61+
id: deployment
62+
uses: actions/deploy-pages@v4

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
site/
23

34
# compiled output
45
dist

0 commit comments

Comments
 (0)