Skip to content

Commit a76ceff

Browse files
Rewrite Docs.yml for Zensical GitHub Pages deploy
1 parent a4670f7 commit a76ceff

1 file changed

Lines changed: 24 additions & 38 deletions

File tree

.github/workflows/Docs.yml

Lines changed: 24 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -7,52 +7,38 @@ on:
77
- main
88
paths:
99
- docs/**
10-
- mkdocs.yml
10+
- zensical.toml
1111
- .github/workflows/Docs.yml
1212

13-
env:
14-
GH_TOKEN: ${{ github.token }}
15-
MKDOCS_GIT_COMMITTERS_APIKEY: ${{ github.token }}
16-
17-
defaults:
18-
run:
19-
shell: pwsh
20-
2113
permissions:
22-
contents: write # to push GitHub Pages to the gh-pages branch
14+
contents: read
2315
pages: write # to deploy to Pages
2416
id-token: write # to verify the deployment originates from an appropriate source
2517

2618
jobs:
2719
build:
2820
runs-on: ubuntu-latest
21+
environment:
22+
name: github-pages
23+
url: ${{ steps.deployment.outputs.page_url }}
2924
steps:
30-
- uses: actions/checkout@v6
25+
- uses: actions/configure-pages@v5
26+
27+
- uses: actions/checkout@v5
28+
29+
- uses: actions/setup-python@v5
3130
with:
32-
fetch-depth: 0
33-
persist-credentials: false
34-
35-
- name: Connect to GitHub
36-
uses: PSModule/GitHub-Script@0097f3bbe3f413f3b577b9bcc600727b0ca3201a # v1.7.10
37-
38-
- name: Install mkdocs-material
39-
env:
40-
GH_TOKEN: ${{ secrets.MATERIAL_FOR_MKDOCS_INSIDER_PAT }}
41-
run: |
42-
pip install git+https://$env:GH_TOKEN@github.com/squidfunk/mkdocs-material-insiders.git
43-
44-
- name: Install plugins
45-
run: |
46-
pip install mkdocs-git-authors-plugin
47-
pip install mkdocs-git-revision-date-localized-plugin
48-
pip install mkdocs-git-committers-plugin-2
49-
pip install mkdocs-rss-plugin
50-
pip install "mkdocs-material[imaging]"
51-
pip install mkdocs-table-reader-plugin
52-
53-
- name: Build mkdocs-material project
54-
run: |
55-
mkdocs build --config-file ./mkdocs.yml --strict --site-dir _site/
56-
57-
- name: Deploy to GitHub Pages
58-
run: mkdocs gh-deploy --force
31+
python-version: 3.x
32+
33+
- name: Install Zensical
34+
run: pip install zensical
35+
36+
- name: Build Zensical project
37+
run: zensical build --clean
38+
39+
- uses: actions/upload-pages-artifact@v4
40+
with:
41+
path: site
42+
43+
- uses: actions/deploy-pages@v4
44+
id: deployment

0 commit comments

Comments
 (0)