generated from onedr0p/cluster-template
-
Notifications
You must be signed in to change notification settings - Fork 13
38 lines (35 loc) · 1.12 KB
/
publish-docs.yaml
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
---
name: Publish docs via GitHub Pages
on: # yamllint disable-line rule:truthy
workflow_dispatch:
push:
branches:
- main
paths:
- ".github/workflows/docs.yaml"
- "mkdocs.yaml"
- "docs/**"
env:
MKDOCS_MATERIAL_INSIDER_TOKEN: ${{ secrets.MKDOCS_MATERIAL_INSIDER_TOKEN }}
jobs:
deploy:
runs-on: ubuntu-20.04
if: github.event.pull_request.head.repo.fork == false
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: 3.x
- run: git config --global user.name "${GITHUB_ACTOR}"
- run: git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- run: pip install git+https://${MKDOCS_MATERIAL_INSIDER_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
- run: |
pip install \
mkdocs-macros-plugin >=0.5 \
mkdocs-material >=1.0 \
mkdocs-minify-plugin>=0.3 \
mkdocs-redirects>=1.0
- run: mkdocs gh-deploy --config-file ./mkdocs.yaml --force
- run: mkdocs --version