-
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (40 loc) · 1.29 KB
/
update.yml
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
name: update
on:
workflow_dispatch:
inputs:
release:
description: 'Release (defaults to latest)'
required: true
default: 'source/master'
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up update
run: bash scripts/setup-update.sh ${{ github.event.inputs.release }}
- name: Merge package.json
run: node scripts/package-json-merge.js
- name: Configure git
run: bash scripts/configure-git-for-actions.sh
- name: Create commit
run: bash scripts/commit-update.sh ${{ github.event.inputs.release }}
- name: Push changes
run: bash scripts/push-to-master.sh
# Actions that push to GitHub don't currently trigger other actions:
# https://github.saobby.my.eu.orgmunity/t/triggering-a-new-workflow-from-another-workflow/16250
# For now, manually deploy
- uses: actions/setup-node@v2-beta
with:
node-version: '14'
- name: Install dependencies
run: yarn install
- name: Build
run: yarn build
- name: Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ github.token }}
BRANCH: gh-pages
FOLDER: build
CLEAN: true