Skip to content

Commit

Permalink
github action fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmadgaz committed Oct 7, 2024
1 parent aa0fdcd commit c869f32
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 21 deletions.
26 changes: 6 additions & 20 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,13 @@ jobs:
run: |
npm run lint
typecheck:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup node and install dependencies
uses: ./.github/actions/setup-node-and-install
with:
node-version: 20

- name: Typecheck test
run: |
npm run type-check
build:
environment: Production
runs-on: ubuntu-latest
env:
NODE_ENV: production
NEXT_PUBLIC_BASE_URL: ${{ secrets.NEXT_PUBLIC_BASE_URL }}
BASE_API_URL: ${{ secrets.BASE_API_URL }}
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -47,11 +37,7 @@ jobs:
node-version: 20

- name: Build app
run: |
touch .env.local
echo NEXT_PUBLIC_BASE_URL=${{ secrets.NEXT_PUBLIC_BASE_URL }} >> .env.local
echo BASE_API_URL=${{ secrets.BASE_API_URL }} >> .env.local
npm run build
run: npm run build

- name: Upload build artifact
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Footer } from '@/components/organisms';
import { cookies } from 'next/headers';

const inter = Inter({ subsets: ['latin'] });

console.log(process.env.NEXT_PUBLIC_BASE_URL);
export const metadata: Metadata = {
title: {
template: '%s | Course Scheduler',
Expand Down

0 comments on commit c869f32

Please sign in to comment.