-
Notifications
You must be signed in to change notification settings - Fork 10
44 lines (42 loc) · 1.34 KB
/
build-and-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 Latest To Develop
on:
push:
branches:
- develop
jobs:
deploy:
name: Creating development deployment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Use Node.js 16
uses: actions/setup-node@v1
with:
node-version: '16.x'
- name: Create Build
env:
REACT_APP_PLANET_API_KEY: ${{ secrets.REACT_APP_PLANET_API_KEY }}
run: |
npm install
npm run build
npm run log
- name: Deploy Build
uses: blueraster/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
SOURCE_DIR: './dist'
DEST_DIR: 'gfw-mapbuilder/develop'
AWS_REGION: 'us-east-1'
AWS_S3_BUCKET: ${{ secrets.MB_AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.MB_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.MB_AWS_SECRET_ACCESS_KEY }}
- name: Slack notification
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_USERNAME: MapBuilderCI
SLACK_CHANNEL: mapbuilder-ci
SLACK_OVERRIDE_MESSAGE: true
uses: blueraster/action-slack@master
with:
args: "Mapbuilder's base branch has been updated \n https://alpha.blueraster.io/gfw-mapbuilder/develop"