Skip to content

Commit 351fc27

Browse files
Refactor and enhance documentation build workflow
Renamed the workflow file to 'build_documentation.yml' and updated the workflow name to 'Build Documentation'. Improved the workflow by adding submodule update steps, fixing a typo in the install step, and clarifying trigger and permissions. Also removed an unused plugin from the dependencies.
1 parent 0131857 commit 351fc27

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed
Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,37 @@
1-
name: Run mkdocs
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
29
on:
310
push:
4-
branches:
5-
- main
11+
branches: ["main"]
612

13+
# Sets permissions of the GITHUB_TOKEN to allow files to be committed to gh-pages branch
714
permissions:
815
contents: write
16+
17+
918
jobs:
1019
deploy:
1120
runs-on: ubuntu-latest
21+
1222
steps:
1323
- name: Checkout repository
1424
uses: actions/checkout@v4
1525
with:
26+
submodules: recursive
1627
fetch-depth: 0
1728

18-
- name: Instal pgnquant for optimize plugin
29+
- name: Update submodules
30+
run: |
31+
git submodule update --init --recursive
32+
git submodule update --recursive --remote
33+
34+
- name: Install pgnquant for optimize plugin
1935
run: sudo apt-get install pngquant
2036

2137
- name: Set up Python runtime
@@ -24,7 +40,7 @@ jobs:
2440
python-version: 3.x
2541

2642
- name: Install Python dependencies
27-
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]'
43+
run: pip install mkdocs-monorepo-plugin mkdocs-redirects mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 Pillow 'mkdocs-material[imaging]'
2844

2945
- name: Set up build cache
3046
run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
@@ -37,6 +53,6 @@ jobs:
3753
3854
- name: Install Insiders build
3955
env:
40-
MKDOCS_TOKEN: ${{ secrets.MKDOCS_SECRET }}
56+
MKDOCS_TOKEN: ${{ secrets.MKDOCS_SECRET }}
4157
run: pip install git+https://${MKDOCS_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
4258
- run: mkdocs gh-deploy --force

0 commit comments

Comments
 (0)