-
Notifications
You must be signed in to change notification settings - Fork 7
62 lines (51 loc) · 1.51 KB
/
documentation.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Documentation
on:
push:
branches:
- 'master'
paths:
- 'docs/wiki/**.md'
- 'README.md'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0
# Generate Wiki pages by using the script inside the docs folder
- name: Create Wiki pages based on subfolders
run: |
chmod +x ./docs/build_wiki.sh
./docs/build_wiki.sh
shell: bash
# Commit generated Wiki Pages
- name: Commit Wiki pages
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add ./docs/wiki/*
git diff-index --quiet HEAD || git commit -m "Add GitHub Wiki Subpages" -a
# Push new files to repository
- name: Push Wiki pages
uses: moodiest/push-to-branch-action@develop
env:
REPO: self
BRANCH: gh-wiki
FOLDER: docs/wiki
GITHUB_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
publish:
runs-on: ubuntu-latest
needs: build
steps:
# Check out wiki branch only
- uses: actions/checkout@v3
with:
ref: 'gh-wiki'
- name: Upload Documentation to Wiki
uses: SwiftDocOrg/github-wiki-publish-action@v1
with:
path: "."
env:
GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}