Skip to content

Commit dffaa40

Browse files
committed
.github: generate documentation using mkdocs
Signed-off-by: Joachim Wiberg <[email protected]>
1 parent d52182b commit dffaa40

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

.github/workflows/docs.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Dotty the Documenteer
2+
3+
on:
4+
push:
5+
branches:
6+
- doc-refactor
7+
paths:
8+
- 'doc/**'
9+
- 'README.md'
10+
- 'mkdocs.yml'
11+
- '.github/workflows/docs.yml'
12+
pull_request:
13+
paths:
14+
- 'doc/**'
15+
- 'README.md'
16+
- 'mkdocs.yml'
17+
- '.github/workflows/docs.yml'
18+
19+
permissions:
20+
contents: read
21+
pages: write
22+
id-token: write
23+
24+
concurrency:
25+
group: "pages"
26+
cancel-in-progress: false
27+
28+
jobs:
29+
build:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
with:
35+
fetch-depth: 0 # Needed for git-revision-date-localized plugin
36+
37+
- name: Setup Python
38+
uses: actions/setup-python@v4
39+
with:
40+
python-version: '3.x'
41+
42+
- name: Install dependencies
43+
run: |
44+
pipx install mkdocs
45+
pipx inject mkdocs mkdocs-material
46+
pipx inject mkdocs pymdown-extensions
47+
pipx inject mkdocs mkdocs-callouts
48+
49+
- name: Build documentation
50+
run: mkdocs build
51+
52+
- name: Upload Pages artifact
53+
uses: actions/upload-pages-artifact@v2
54+
with:
55+
path: site/
56+
57+
deploy:
58+
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
59+
needs: build
60+
runs-on: ubuntu-latest
61+
environment:
62+
name: github-pages
63+
url: ${{ steps.deployment.outputs.page_url }}
64+
steps:
65+
- name: Deploy to GitHub Pages
66+
id: deployment
67+
uses: actions/deploy-pages@v2

0 commit comments

Comments
 (0)