-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (54 loc) · 1.97 KB
/
cwbi-dev-build-push.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
57
58
59
60
61
62
#This is a basic workflow to help you get started with Actions
name: Build UI, Push to AWS Dev S3
# Controls when the action will run. Invokes the workflow on push events but only for the main branch
on:
push:
branches: [cwbi-dev]
env:
AWS_REGION: aws-us-gov #Change to reflect your Region
# Permission can be added at job level or workflow level
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
jobs:
Build-Push-UI-to-Dev:
env:
REACT_APP_AUTH_HOST: https://identityc-test.cwbi.us/auth
REACT_APP_AUTH_REDIRECT_URL: https://cumulus.dev.cwbi.us
REACT_APP_CUMULUS_API_URL: https://cumulus.dev.cwbi.us/api
# REACT_APP_SHARED_API_URL: https://develop-shared-api.corps.cloud
REACT_APP_ISDEVELOPMENT: true
runs-on: ubuntu-latest
steps:
- name: Git clone the repository
uses: actions/checkout@v3
# Step 2: Set up Node.js (React app requires Node.js)
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 'node' # Use the latest version of Node.js
# Step 3: Install dependencies
- name: Install Dependencies
run: npm install
# Step 4: Build the React app for production
- name: Build React App
run: npm run build
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-gov-west-1
role-to-assume: arn:aws-us-gov:iam::718787032875:role/github-actions-s3-cumulus
output-credentials: true
# Hello from AWS: WhoAmI
- name: Sts GetCallerIdentity
run: |
aws sts get-caller-identity
# - name: Login to Amazon ECR
# id: login-ecr
# uses: aws-actions/amazon-ecr-login@v2
# with:
# mask-password: 'true'
- name: Deploy to S3
env:
S3_BUCKET: cumulus-dev
run: npm run deploy-develop