-
-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (35 loc) · 1.16 KB
/
Deploy MkDocs.yml
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
name: Deploy MkDocs to GitHub Pages
on:
push:
branches:
- main # The branch you want to deploy from
paths: # Only deploy MkDocs when the contents of the docs folder change or when this workflow changes.
- 'docs/**'
- '.github/workflows/Deploy MkDocs.yml'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x' # specify the Python version
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mkdocs mkdocs-material
- name: Build and deploy
run: |
mkdocs build
mkdocs gh-deploy --force
- name: Copy Module MD to Repository README
shell: pwsh
run: Copy-Item ./docs/index.md ./README.md
# git-auto-commit-action only runs on Linux-based platforms.
- name: Commit Changes to Repo
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'Copy MkDocs index to README'
file_pattern: "README.md"