Skip to content

fix: update output type handling in TryFairPage , disable polygon if … #948

fix: update output type handling in TryFairPage , disable polygon if …

fix: update output type handling in TryFairPage , disable polygon if … #948

name: Frontend Build
on:
push:
branches: [master, develop]
paths:
- "frontend/**"
- ".github/workflows/frontend_build.yml"
pull_request:
branches: [master, develop]
paths:
- "frontend/**"
- ".github/workflows/frontend_build.yml"
jobs:
frontend-unit-test:
uses: hotosm/gh-workflows/.github/workflows/test_pnpm.yml@3.2.0
with:
working_dir: frontend
Build_On_Ubuntu:
runs-on: ubuntu-latest
needs: [frontend-unit-test]
env:
CI: false
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Install pnpm
run: npm install -g pnpm@9.8.0
- name: Cache pnpm store
uses: actions/cache@v4
id: pnpm-cache
with:
# Caches the pnpm store which is used to save downloaded packages
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('frontend/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Install Node.js dependencies
if: steps.pnpm-cache.outputs.cache-hit != 'true'
working-directory: ./frontend
run: pnpm install --frozen-lockfile
- name: Build
working-directory: ./frontend
run: pnpm run build
Docker_Build:
runs-on: ubuntu-latest
needs: [frontend-unit-test]
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build dev image
uses: docker/build-push-action@v6
with:
context: ./frontend
file: ./frontend/Dockerfile.dev
push: false
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build prod image
uses: docker/build-push-action@v6
with:
context: ./frontend
file: ./frontend/Dockerfile.prod
push: false
cache-from: type=gha
cache-to: type=gha,mode=max