Skip to content

Commit a8582a2

Browse files
Update workflows
Use requirements.txt to install dependencies Adds new workflow that uses the sparse checkout attribute to reduce the build time
1 parent 147cf4d commit a8582a2

File tree

3 files changed

+71
-1
lines changed

3 files changed

+71
-1
lines changed

.github/workflows/build_documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
python-version: 3.x
4141

4242
- name: Install Python dependencies
43-
run: pip install mkdocs-monorepo-plugin mkdocs-redirects mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 Pillow 'mkdocs-material[imaging]'
43+
run: pip install -r requirements.txt
4444

4545
- name: Set up build cache
4646
run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
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+
submodules: recursive
27+
fetch-depth: 0
28+
sparse-checkout: |
29+
docs/modules.md
30+
docs/carriers.md
31+
docs/system_overview.md
32+
docs/resources.md
33+
flex_boards/
34+
overrides/.icons/
35+
36+
- name: Update submodules
37+
run: |
38+
git submodule update --init --recursive
39+
git submodule update --recursive --remote
40+
41+
- name: Install pgnquant for optimize plugin
42+
run: sudo apt-get install pngquant
43+
44+
- name: Set up Python runtime
45+
uses: actions/setup-python@v5
46+
with:
47+
python-version: 3.x
48+
49+
- name: Install Python dependencies
50+
run: pip install -r requirements.txt
51+
52+
- name: Set up build cache
53+
run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
54+
- uses: actions/cache@v4
55+
with:
56+
key: mkdocs-material-${{ env.cache_id }}
57+
path: .cache
58+
restore-keys: |
59+
mkdocs-material-
60+
61+
- name: Install Insiders build
62+
env:
63+
MKDOCS_TOKEN: ${{ secrets.MKDOCS_SECRET }}
64+
run: pip install git+https://${MKDOCS_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
65+
- run: mkdocs gh-deploy --force

requirements.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
mkdocs-monorepo-plugin
2+
mkdocs-redirects
3+
mkdocs-git-revision-date-localized-plugin
4+
mkdocs-git-committers-plugin-2
5+
Pillow

0 commit comments

Comments
 (0)