gpted / .github /workflows /frontend-build.yml
mebubo's picture
Github actions: frontend build
a4b9140
raw
history blame contribute delete
824 Bytes
name: Frontend Build
on:
push:
branches: [ main ]
paths:
- 'frontend/**'
pull_request:
branches: [ main ]
paths:
- 'frontend/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
run: npm ci
working-directory: ./frontend
- name: Build frontend
run: npm run build
working-directory: ./frontend
env:
NODE_ENV: production
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: frontend-build
path: frontend/public
retention-days: 5