Skip to content

Workflow file for this run

name: Build and deploy prod version
on:
push:
branches:
- master
jobs:
build-deploy:
runs-on: ubuntu-latest
environment: prod
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
- 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: eu-west-1
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest
run_install: false
- name: Installing project dependencies
run: pnpm install
- name: Building the project
run: pnpm run build:prod
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Deploy static site to S3 bucket
run: aws s3 sync ./dist/ ${{ secrets.AWS_S3 }} --delete