Skip to content

Commit 1937847

Browse files
Add build workflow
1 parent 5c7516b commit 1937847

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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+
28+
- name: Install pgnquant for optimize plugin
29+
run: sudo apt-get install pngquant
30+
31+
- name: Set up Python runtime
32+
uses: actions/setup-python@v5
33+
with:
34+
python-version: 3.x
35+
36+
- name: Install Python dependencies
37+
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]'
38+
39+
- name: Set up build cache
40+
run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
41+
- uses: actions/cache@v4
42+
with:
43+
key: mkdocs-material-${{ env.cache_id }}
44+
path: .cache
45+
restore-keys: |
46+
mkdocs-material-
47+
48+
- name: Install Insiders build
49+
env:
50+
MKDOCS_TOKEN: ${{ secrets.MKDOCS_SECRET }}
51+
run: pip install git+https://${MKDOCS_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
52+
- run: mkdocs gh-deploy --force

0 commit comments

Comments
 (0)