Update from DMStandard #30
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: Checkout documentation tool | |
uses: actions/checkout@v3 | |
with: | |
repository: "OpenDreamProject/OpenDream" | |
ref: "ea42739dfa622682d1ce3abdd55730821310539d " | |
path: "oddt" | |
- name: Build documentation tool | |
run: | | |
cd oddt | |
git submodule update --init --recursive | |
dotnet build -o ../oddt-bin OpenDreamDocumentationTool | |
cd .. | |
- name: Get DMStandard | |
uses: actions/checkout@v3 | |
with: | |
repository: "OpenDreamProject/OpenDream" | |
path: od-master | |
- name: Run Documentation Tool | |
run: | | |
dotnet oddt-bin/OpenDreamDocumentationTool.dll --documentation=ref --standard=od-master/DMCompiler/DMStandard | |
- name: Commit | |
continue-on-error: true | |
run: | | |
cd ref | |
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/harryob/OpenDream/tree/oddt/OpenDreamDocumentationTool)." |