Skip to content

Merge pull request #81 from currents-dev/dependabot/npm_and_yarn/nano… #66

Merge pull request #81 from currents-dev/dependabot/npm_and_yarn/nano…

Merge pull request #81 from currents-dev/dependabot/npm_and_yarn/nano… #66

Workflow file for this run

name: Deploy
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build:
if: "!contains(toJSON(github.event.commits.*.message), '[skip ci]')"
runs-on: ubuntu-latest
environment: Production
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
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: Deploy dashboard to bucket
run: aws s3 sync ./apps/web/dist s3://${{ secrets.S3_BUCKET }}
- name: Invalidate dashboard cloudfront
run: aws cloudfront create-invalidation --distribution-id ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} --paths "/*"