Skip to content

Workflow file for this run

name: Build & Deploy
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Use Node.js LTS
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
- name: Install dependencies
working-directory: frontend
run: npm ci
- name: Build React app
working-directory: frontend
run: npm run build
deploy-dev:
runs-on: ubuntu-latest
needs: build
permissions:
id-token: write
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Terragrunt
run: wget https://github.com/gruntwork-io/terragrunt/releases/download/v0.54.22/terragrunt_linux_amd64 -O /usr/local/bin/terragrunt && chmod +x /usr/local/bin/terragrunt
- name: Set environment variable for dev deployment
run: echo "TF_VAR_environment=dev" >> $GITHUB_ENV
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::603042156394:role/_github_actions
aws-region: eu-west-1
- name: Run Terragrunt
run: terragrunt apply -auto-approve
working-directory: environments/dev