-
Notifications
You must be signed in to change notification settings - Fork 108
38 lines (34 loc) · 1.06 KB
/
build-docs.yaml
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
# Regenerates the documentation for the "Command Reference" section of the site https://maester.dev
name: build-docs
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow updates to the repository
permissions:
contents: write
id-token: write
checks: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update docs
run: ./build/Update-CommandReference.ps1
shell: pwsh
- name: Update repo
run: |
if [[ `git status --porcelain` ]]; then
# Changes
echo "Updating command reference"
git config --global user.name 'Merill Fernando'
git config --global user.email '[email protected]'
git add -A && git commit -m "Bot: Updating command reference"
git push
else
# No changes
echo "No changes"
fi