Skip to content

Commit a41e4d2

Browse files
Add build workflow
Add workflow to build documentation for GitHub Pages
1 parent f4e6ef4 commit a41e4d2

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Build Documentation
2+
3+
# Allows you to run this workflow manually from the Actions tab
4+
on:
5+
workflow_dispatch:
6+
branches: ["main"]
7+
8+
# Allows this workflow to run automatically on pushes/commits
9+
# on:
10+
# push:
11+
# branches: ["main"]
12+
13+
# Sets permissions of the GITHUB_TOKEN to allow files to be committed to gh-pages branch
14+
permissions:
15+
contents: write
16+
17+
18+
jobs:
19+
deploy:
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
submodules: recursive
28+
29+
- name: Install pgnquant for optimize plugin
30+
run: sudo apt-get install pngquant
31+
32+
- name: Set up Python runtime
33+
uses: actions/setup-python@v5
34+
with:
35+
python-version: 3.x
36+
37+
- name: Install Python dependencies
38+
run: pip install mkdocs-monorepo-plugin mkdocs-redirects mkdocs-git-authors-plugin mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 Pillow 'mkdocs-material[imaging]'
39+
40+
- name: Set up build cache
41+
run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
42+
- uses: actions/cache@v4
43+
with:
44+
key: mkdocs-material-${{ env.cache_id }}
45+
path: .cache
46+
restore-keys: |
47+
mkdocs-material-
48+
49+
- name: Install Insiders build
50+
env:
51+
MKDOCS_TOKEN: ${{ secrets.MKDOCS_SECRET }}
52+
run: pip install git+https://${MKDOCS_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
53+
- run: mkdocs gh-deploy --force

0 commit comments

Comments
 (0)