Skip to content

Update dependencies #337

Update dependencies

Update dependencies #337

Workflow file for this run

name: Lint, Build and Deploy
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
check-latest: true
- name: Checkout repo
uses: actions/checkout@v4
- name: Audit dependencies
run: npm audit
- name: Install dependencies
run: npm ci
- name: Check code
run: npm run check
- name: Lint code
run: npm run lint
build:
name: Build and Deploy
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
needs: lint
environment: aws-production
runs-on: ubuntu-latest
env:
AWS_REGION: eu-central-1
steps:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
check-latest: true
- name: Set up OpenTofu
uses: opentofu/setup-opentofu@v1
- name: Checkout repo
uses: actions/checkout@v4
- name: Install dependencies
run: npm ci
- name: Build application
run: npm run build
- name: Deploy to production
run: npm run deploy
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}