-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (37 loc) · 1.23 KB
/
update.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
39
40
41
42
43
44
45
name: Update Reference Documentation
on:
repository_dispatch:
types: [update-ref]
workflow_dispatch:
permissions:
contents: write
jobs:
update-ref:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Install tooling
uses: ok-nick/[email protected]
with:
cache: true
- name: Update discord-luau source
run: git submodule update --remote --recursive
- name: Update ref files
run: |
./lunew generateReference
- name: Commit & push
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -A
git commit -m "docs: update refs for https://github.com/DiscordLuau/discord-luau/commit/${{ github.event.client_payload.sha }}" && \
git push || echo "warn: no changes to commit"
- name: Deploy dispatch
uses: peter-evans/repository-dispatch@v3
with:
repository: DiscordLuau/docs
event-type: deploy
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'