-
Notifications
You must be signed in to change notification settings - Fork 7
55 lines (47 loc) · 1.43 KB
/
build-reference-data.yml
File metadata and controls
55 lines (47 loc) · 1.43 KB
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
name: Build reference data
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
push:
branches: [main]
# Only re-run on changes to the build itself
paths:
- '.github/scripts/build-reference-data.mjs'
- '.github/workflows/build-reference-data.yml'
permissions:
contents: write
concurrency:
group: build-reference-data
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout website
uses: actions/checkout@v4
- name: Checkout plugdata docs (sparse)
uses: actions/checkout@v4
with:
repository: plugdata-team/plugdata
ref: develop
path: .plugdata
sparse-checkout: Resources/Documentation
sparse-checkout-cone-mode: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Build bundle
run: node .github/scripts/build-reference-data.mjs .plugdata assets
- name: Commit if changed
run: |
git config user.name 'github-actions[bot]'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
git add assets/reference-data.json assets/reference-data.meta.json
if git diff --cached --quiet; then
echo 'No changes to commit.'
else
git commit -m 'chore(data): rebuild reference bundle'
git push
fi