Skip to content

Commit 01893f7

Browse files
committed
Add actions workflow;
1 parent 4ad2eed commit 01893f7

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/generate.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Generate
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
paths:
8+
- 'api/lovr/**.lua'
9+
10+
permissions:
11+
contents: write
12+
13+
jobs:
14+
generate:
15+
name: Generate
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
with:
21+
ref: dev
22+
path: docs
23+
24+
- name: Download LÖVR
25+
run: curl -sOL https://lovr.org/f/lovr-x86_64.AppImage && chmod +x lovr-x86_64.AppImage
26+
27+
- name: Generate
28+
run: ./lovr-x86_64.AppImage docs/api
29+
30+
- name: Checkout cats branch
31+
uses: actions/checkout@v4
32+
with:
33+
ref: cats
34+
path: cats
35+
36+
- name: Publish
37+
run: |
38+
rm -rf cats/library
39+
mv library cats
40+
cd cats
41+
if ! git diff --quiet; then
42+
git config --global user.name 'bjornbytes'
43+
git config --global user.email '[email protected]'
44+
git commit -am "Rebuild;"
45+
git push origin cats
46+
else
47+
echo "No changes."
48+
fi

0 commit comments

Comments
 (0)