Skip to content

Commit

Permalink
setup ci build for cwbi-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
adamscarberry committed Nov 20, 2024
1 parent 3b6281f commit bf9dfc2
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 2 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/cwbi-dev-build-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#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
- 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: Build Image; Push to S3
env:
S3_BUCKET: cumulus-dev
run: npm run deploy-develop
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"test": "react-scripts test",
"eject": "react-scripts eject",
"deploy-tailwindui": "aws s3 rm s3://$CASTLECI_DEVELOP_S3_BUCKET_APPS/cumulus-tailwindui --recursive && aws s3 cp ./build/ s3://$CASTLECI_DEVELOP_S3_BUCKET_APPS/cumulus-tailwindui --recursive",
"deploy-develop": "aws s3 rm s3://$CASTLECI_DEVELOP_S3_BUCKET_APPS/cumulus --recursive && aws s3 cp ./build/ s3://$CASTLECI_DEVELOP_S3_BUCKET_APPS/cumulus --recursive",
"deploy-develop": "aws s3 rm s3://$S3_BUCKET/cumulus/ui --recursive && aws s3 cp ./build/ s3://$S3_BUCKET/cumulus/ui --recursive",
"deploy-stable": "aws s3 rm s3://$CASTLECI_STABLE_S3_BUCKET_APPS/cumulus --recursive && aws s3 cp ./build/ s3://$CASTLECI_STABLE_S3_BUCKET_APPS/cumulus --recursive"
},
"eslintConfig": {
Expand All @@ -59,4 +59,4 @@
"react-scripts": "5.0.1",
"tailwindcss": "^3.0.18"
}
}
}

0 comments on commit bf9dfc2

Please sign in to comment.