forked from bridge-core/editor
-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (50 loc) · 1.79 KB
/
deploy.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
52
53
54
55
name: Build and Deploy
on:
release:
types: [published]
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: macos-latest
steps:
- name: Checkout 🛎️
uses: actions/[email protected]
with:
persist-credentials: false
- name: Install Node 🧰
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Cache node modules 📖
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install and Build 🔧
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm install
NODE_OPTIONS=--max_old_space_size=4096 npm run build
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: dist
CLEAN: true
# - name: Build & Publish Compiler Plugin Types 📝
# env:
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# run: |
# npm run build-compiler-types
# cd ./compilerTypes
# npm publish
# cd ..