Skip to content

fix: cannot redirect to project page for the first time (#155) #86

fix: cannot redirect to project page for the first time (#155)

fix: cannot redirect to project page for the first time (#155) #86

Workflow file for this run

name: Frontend CI
on:
push:
branches: [ main ]
paths:
- 'frontend/**'
- 'codefox-common/**'
pull_request:
branches: [ main ]
paths:
- 'frontend/**'
- 'codefox-common/**'
workflow_dispatch:
jobs:
build:
name: Install and Build Frontend
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: Build codefox-common
working-directory: ./codefox-common
run: pnpm build
- name: Build frontend
working-directory: ./frontend
run: pnpm build
- name: Cache build artifacts
uses: actions/cache@v3
with:
path: |
./frontend/.next
./frontend/node_modules
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-