-
Notifications
You must be signed in to change notification settings - Fork 5
44 lines (42 loc) · 1.31 KB
/
documentation.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
39
40
41
42
43
44
name: Publish mkdocs documentation
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
release:
types: [created]
# push:
# branches:
# - main
# paths:
# - 'README.md'
# - 'docs/**'
# For testing purpose, delete this trigger afterwards
push:
paths:
- '.github/workflows/documentation.yaml'
jobs:
build-and-publish:
name: Publish mkdocs documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- run: pip install mkdocs
- name: Copy the Readme
run: |
cp "./README.md" "./docs/overview.md"
# change relative paths to docs folder in the README '(docs/xx' -> '(xx'
- name: Update relative paths
run: |
sed -i 's/(docs\//(/g' ./docs/overview.md
# - name: Commit documentation
# run: |
# git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
# git config user.name "github-actions[bot]"
# git add ./docs/overview.md
# git commit -m "Automatic documentation update." || echo "No changes to commit"
# git push || echo "No changes to push"
- run: mkdocs gh-deploy --force