Skip to content

Add workflow files to build frontend and backend on PRs to main #4

Add workflow files to build frontend and backend on PRs to main

Add workflow files to build frontend and backend on PRs to main #4

name: build-frontend-on-pr.yml
on:
workflow_dispatch:
push:
branches: [main]
paths-ignore:
- bff/**
pull_request:
types: [opened, synchronize, reopened]
paths-ignore:
- bff/**
jobs:
build:
runs-on: ubuntu-latest
name: Test & Build
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Enable Corepack to use yarn version > 1
run: corepack enable
- name: install dependencies
working-directory: ./frontend
run: yarn --immutable
- name: install node
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: run eslint
working-directory: ./frontend
run: yarn lint
- name: run build
working-directory: ./frontend
run: yarn build