forked from shfshanyue/2019-ncov
-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (49 loc) · 1.76 KB
/
nodejs.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
56
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches:
- prod
# schedule:
# - cron: '0 19-23,0-14 * * *'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: use Node.js 10.x
uses: actions/setup-node@v1
with:
node-version: 10.x
# - name: npm install
# run: npm ci
# - name: build data
# env:
# REACT_APP_DRIVE_KEY: ${{secrets.DRIVE_TOKEN}}
# run: node scripts/google-drive-download.js
# - name: npm run build
# env:
# REACT_APP_MAP_API: ${{ secrets.MAPBOX_TOKEN }}
# run: npm run build&&cp config/google3413bf25c03a27c3.html build/
# - name: sycn with s3
# uses: jakejarvis/s3-sync-action@master
# with:
# args: --follow-symlinks --delete
# env:
# AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# AWS_REGION: 'ap-southeast-2' # optional: defaults to us-east-1
# SOURCE_DIR: 'build' # optional: defaults to entire repository
# DEST_DIR: 'public'
- name: deploy to master branch
uses: JamesIves/github-pages-deploy-action@releases/v3
env:
REACT_APP_MAP_API: ${{ secrets.MAPBOX_TOKEN }}
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: master # The branch the action should deploy to.
FOLDER: ghPage # The folder the action should deploy.