2022-10-26 20:44:48 -06:00
|
|
|
name: Cloud-Deploy
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ main ]
|
|
|
|
# # Publish semver tags as releases.
|
|
|
|
# tags: [ 'v*.*.*' ]
|
|
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
name: deploy
|
|
|
|
runs-on: ubuntu-latest
|
2022-10-26 23:21:25 -06:00
|
|
|
permissions:
|
|
|
|
id-token: write
|
|
|
|
contents: read
|
2022-10-26 20:44:48 -06:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: 18.x
|
|
|
|
- uses: actions/setup-go@v3
|
|
|
|
with:
|
|
|
|
go-version: '1.18.3'
|
|
|
|
- run: go version
|
|
|
|
- run: |
|
2022-10-26 21:02:18 -06:00
|
|
|
make frontend-dep
|
2022-10-26 20:44:48 -06:00
|
|
|
cd frontend
|
|
|
|
yarn run build -- --configuration sandbox --output-path=../dist
|
2022-10-26 23:21:25 -06:00
|
|
|
|
|
|
|
- name: Configure AWS credentials using delegated access
|
|
|
|
uses: aws-actions/configure-aws-credentials@v1
|
|
|
|
with:
|
|
|
|
role-to-assume: arn:aws:iam::410145376638:role/fasten-sandbox-app-gh-frontend-deploy-role
|
|
|
|
aws-region: us-east-1
|
|
|
|
|
|
|
|
- name: Copy files to the test website with the AWS CLI
|
|
|
|
run: |
|
2022-10-27 00:10:16 -06:00
|
|
|
aws s3 sync dist s3://fasten-sandbox-app-frontend-bucket/web --acl public-read
|
2022-10-26 23:21:25 -06:00
|
|
|
|
|
|
|
|
2022-10-26 20:44:48 -06:00
|
|
|
# env:
|
|
|
|
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
|
|
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
|
|
# - uses: chrnorm/deployment-action@v2
|
|
|
|
# name: Create GitHub deployment
|
|
|
|
# id: deployment
|
|
|
|
# with:
|
|
|
|
# token: '${{ github.token }}'
|
|
|
|
# environment-url: https://lighthouse.fastenhealth.com/sandbox/
|
|
|
|
# environment: sandbox
|
|
|
|
# initial-status: success
|
|
|
|
# more steps below where you run your deployment scripts inside the same action
|
|
|
|
|