generated from wednesday-solutions/react-template
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (48 loc) · 1.51 KB
/
uat.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: AWS S3 Static Site Deploy
on:
pull_request:
branches: [master]
jobs:
aws_deply:
name: Deploy to AWS
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
env:
AWS_S3_BUCKET: wednesday-react-template
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
PATHS: '/*'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get branch name
id: vars
run: echo ::set-output name=branch::${{ github.event.pull_request.head.ref }}
- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- name: Install Dependencies
run: yarn
- name: Build
run: export BRANCH_NAME=${{ steps.vars.outputs.branch }} && yarn build:uat
- name: AWS S3 Deploy
uses: jakejarvis/[email protected]
with:
args: --acl public-read --follow-symlinks
env:
SOURCE_DIR: './build/'
DEST_DIR: ${{ steps.vars.outputs.branch }}
- name: List UAT branches in fallback page
run: yarn ls-uat-branches
- name: Deploy S3 fallback page
uses: jakejarvis/[email protected]
with:
args: --acl public-read --follow-symlinks --exclude 'tests/*'
env:
SOURCE_DIR: './uat/'
DEST_DIR: ''