-
Notifications
You must be signed in to change notification settings - Fork 4
74 lines (62 loc) · 2.16 KB
/
autodoc.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
63
64
65
66
67
68
69
70
71
72
73
74
name: Update from DMStandard
permissions:
contents: write
pull-requests: write
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
path: "ref"
- name: Setup Dotnet
uses: actions/setup-dotnet@v4
- name: Build documentation tool
run: |
cd ref/tools/OpenDreamDocumentationTool
git submodule update --init
cd OpenDream
git checkout master && git pull
git submodule update --init --recursive && cd ..
dotnet build -o $GITHUB_WORKSPACE/oddt-bin OpenDreamDocumentationTool
- name: Get DMStandard
uses: actions/checkout@v3
with:
repository: "OpenDreamProject/OpenDream"
path: opendream
- name: Run Documentation Tool
run: |
dotnet oddt-bin/OpenDreamDocumentationTool.dll --documentation=ref --standard=opendream/DMCompiler/DMStandard
- name: Install dependencies
uses: bahmutov/npm-install@v1
with:
working-directory: ref
- name: Auto-Format
run: |
cd ref
npm run format
- name: Commit
continue-on-error: true
run: |
cd ref
git submodule update --init
git config --local user.email "[email protected]"
git config --local user.name "Autodoc"
git checkout -b autodoc-update
git add content
git commit -m "Automatic DMStandard update" -a || true
git push -f -u origin autodoc-update
- name: Create Pull Request
if: ${{ success() }}
continue-on-error: true
env:
GH_TOKEN: ${{ github.token }}
run: |
cd ref
gh pr create --title "Automatic Reference Update" --body "This pull request updates the reference based on the [DMStandard](https://github.com/OpenDreamProject/OpenDream/tree/master/DMCompiler/DMStandard), as generated by the [Documentation Tool](https://github.com/OpenDreamProject/od-dm-reference/tree/main/tools/OpenDreamDocumentationTool)."