Skip to content

Deploy to AWS

Deploy to AWS #3

Workflow file for this run

name: Deploy
run-name: Deploy to AWS
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 16
- name: Install dependencies
run: npm install
- name: Build
run: npm run build:prod
- name: Deploy
run: aws s3 sync ./dist/user-interface ${{ secrets.S3_BUCKET }} --region ${{ secrets.AWS_DEFAULT_REGION }} --delete
run: echo "Invalidating Old Distribution"

Check failure on line 36 in .github/workflows/deploy.yml

View workflow run for this annotation

GitHub Actions / Deploy

Invalid workflow file

The workflow is not valid. .github/workflows/deploy.yml (Line: 36, Col: 7): 'run' is already defined .github/workflows/deploy.yml (Line: 37, Col: 7): 'run' is already defined
run: aws cloudfront create-invalidation --distribution-id ${{ secrets.DISTRIBUTION_ID }} --paths '/*'
run: echo "Deployed Successfully"