-
Notifications
You must be signed in to change notification settings - Fork 65
44 lines (35 loc) · 1.06 KB
/
dev-demo-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
name: Deploy to Netlify on pull requests
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout repo
- uses: actions/checkout@v2
- name: Cache node modules
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Node 16
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Prepare
run: npm ci
- name: Install Netlify
run: npm install netlify-cli -g
- name: Build site
run: npm run build
- name: Copy files
run: |
mkdir -p public
mv examples/* public/
# Deploy the site with netlify-cli
- name: Deploy Site
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
run: netlify deploy --dir=public --filter packages/beacon-sdk --alias=$GITHUB_SHA --message=$GITHUB_SHA