-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (40 loc) · 1.19 KB
/
Docs.yml
File metadata and controls
48 lines (40 loc) · 1.19 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
name: Documentation Update
on:
push:
branches:
- master
jobs:
docs:
runs-on: ubuntu-latest
name: Generate Documentation
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: false
- name: Initialize and update submodule
run: |
git submodule update --init --remote docs
cd docs
git checkout master
git pull origin master
cd ..
- name: Setup PHP
uses: shivammathur/setup-php@v2
- name: Install Dev Dependencies
run: composer update
- name: Generate Documentation
run: php ./makeDocs.php --push
- name: Commit & Push to Wiki
run: |
cd docs
git config user.email "actions@github.com"
git config user.name "GitHub Actions - update documentation"
git add *.md
(git commit -m "Auto-Update Documentation" && git push) || echo "No changes to commit"
cd ..
- name: Commit & Push Submodule Update to Main Repo
uses: Andro999b/push@v1.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
message: "Auto-updated documentation"