-
-
Notifications
You must be signed in to change notification settings - Fork 471
37 lines (34 loc) · 1.21 KB
/
update-documentation.yml
File metadata and controls
37 lines (34 loc) · 1.21 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
name: Update p5.js documentation
on:
# This workflow is triggered by the p5.js repo on every new release.
repository_dispatch
env:
# These are the tag name and the commit sha of the p5.js release.
P5JS_REF: ${{github.event.client_payload.ref}}
P5JS_SHA: ${{github.event.client_payload.sha}}
jobs:
build:
name: Update p5.js documentation and library files
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v1
- name: Install Node.JS 12.x
uses: actions/setup-node@v1
with:
node-version: 18.x
- name: Extract documentation and library files from the p5.js repo
run: |
npm install
npm run grunt update-enJSON --target="${{ steps.p5js.outputs.VERSION }}"
- name: Get p5.js release info
id: p5js
run: |
echo ::set-output name=VERSION::${P5JS_REF/refs\/tags\//}
echo ::set-output name=SHA::${P5JS_SHA}
- name: Commit changes
uses: EndBug/add-and-commit@v4
with:
message: 'Update files for p5.js ${{ steps.p5js.outputs.VERSION }} release (${{ steps.p5js.outputs.SHA }})'
env:
GITHUB_TOKEN: ${{ secrets.DOCS_COMMIT_TOKEN }}