generated from PSModule/Template-Docs
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (48 loc) · 1.53 KB
/
Docs.yml
File metadata and controls
58 lines (48 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Publish Docs
on:
workflow_dispatch:
push:
branches:
- main
paths:
- docs/**
- mkdocs.yml
- .github/workflows/Docs.yml
env:
GH_TOKEN: ${{ github.token }}
MKDOCS_GIT_COMMITTERS_APIKEY: ${{ github.token }}
defaults:
run:
shell: pwsh
permissions:
contents: write # to push GitHub Pages to the gh-pages branch
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false
- name: Connect to GitHub
uses: PSModule/GitHub-Script@0097f3bbe3f413f3b577b9bcc600727b0ca3201a # v1.7.10
- name: Install mkdocs-material
env:
GH_TOKEN: ${{ secrets.MATERIAL_FOR_MKDOCS_INSIDER_PAT }}
run: |
pip install git+https://$env:GH_TOKEN@github.com/squidfunk/mkdocs-material-insiders.git
- name: Install plugins
run: |
pip install mkdocs-git-authors-plugin
pip install mkdocs-git-revision-date-localized-plugin
pip install mkdocs-git-committers-plugin-2
pip install mkdocs-rss-plugin
pip install "mkdocs-material[imaging]"
pip install mkdocs-table-reader-plugin
- name: Build mkdocs-material project
run: |
mkdocs build --config-file ./mkdocs.yml --strict --site-dir _site/
- name: Deploy to GitHub Pages
run: mkdocs gh-deploy --force