Add workflows for build #9
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "frontend/**" # Only trigger on changes within this folder | |
- ".github/**" | |
pull_request: | |
paths: | |
- "frontend/**" # Only trigger on changes within this folder | |
- ".github/**" | |
workflow_dispatch: | |
jobs: | |
frontend-build-check: | |
name: Frontend Build Check | |
runs-on: ubuntu-latest | |
# Cache dependencies to speed up the workflow | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
- name: Enable Corepack | |
run: corepack enable | |
- name: Set Yarn version to Berry | |
run: corepack prepare yarn@4.2.2 --activate | |
- name: Install dependencies | |
working-directory: ./frontend | |
run: yarn install | |
- name: Run build | |
working-directory: ./frontend | |
run: yarn build |