Skip to content

added workflow for s3 deployment #3

added workflow for s3 deployment

added workflow for s3 deployment #3

name: Deploy VEDA Auth Portal to AWS S3
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./veda-auth-portal
steps:
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.DEPLOYMENT_ROLE_ARN }}
role-session-name: "github-${{ github.repository }}-${{ github.run_id }}"
aws-region: "us-east-2"
- name: Deploy app build to S3 bucket
run: aws s3 sync ./dist/ s3://veda-auth-central-portal --delete
# - name: Deploy to S3
# uses: jakejarvis/s3-sync-action@master
# with:
# args: --acl public-read --follow-symlinks --delete
# env:
# AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# SOURCE_DIR: 'dist'