-
-
Notifications
You must be signed in to change notification settings - Fork 222
53 lines (46 loc) · 1.62 KB
/
doctum.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
name: Build API documentation
on:
workflow_dispatch:
push:
branches: [ '[0-9]+.[0-9]' ]
jobs:
build-api-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build API documentation
uses: sudo-bot/action-doctum@v5
with:
config-file: .doctum.php
method: "update"
# use of --only-version fixes branch name in "View source" links to GitHub
cli-args: "--output-format=github --no-ansi --no-progress --ignore-parse-errors --only-version=${{ github.ref_name }}"
- name: Check out documentation site
uses: actions/checkout@v4
with:
repository: neos/neos.github.io
path: docs-site
- name: Move rendered docs to site
run: |
rm -rf docs-site/neos/${{ github.ref_name }}
mkdir -p docs-site/neos/${{ github.ref_name }}
mv build/* docs-site/neos/${{ github.ref_name }}/
- name: Commit update
run: |
cd docs-site
git config --local --unset-all "http.https://github.com/.extraheader"
git config --global user.email "[email protected]"
git config --global user.name "Neos Bot"
if [ -z "$(git status --porcelain)" ]; then
echo "No changes to commit"
exit 0
fi
git add .
git commit -m "TASK: Update API docs from ${{ github.ref_name }}"
- name: Push to git
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.NEOS_BOT_TOKEN }}
repository: neos/neos.github.io
directory: docs-site
branch: main