From 55a1749ae13664bc7aee3164edeb6c0cbba84b43 Mon Sep 17 00:00:00 2001 From: Aryan Kothari <87589047+thearyadev@users.noreply.github.com> Date: Sun, 21 Jan 2024 16:38:07 +0000 Subject: [PATCH] move to frontend before bulding --- .github/workflows/pages.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index f1b853e8..db288a7f 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -76,15 +76,17 @@ jobs: echo "command=ci" >> $GITHUB_OUTPUT echo "runner=npx --no-install" >> $GITHUB_OUTPUT exit 0 + + - name: Move to ./frontend + run: cd ./frontend + - name: Setup Node uses: actions/setup-node@v4 - run: cd ./frontend with: node-version: "20" cache: ${{ steps.detect-package-manager.outputs.manager }} - name: Setup Pages uses: actions/configure-pages@v4 - working-directory: ./frontend with: # Automatically inject basePath in your Next.js configuration file and disable # server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized). @@ -93,7 +95,6 @@ jobs: static_site_generator: next - name: Restore cache uses: actions/cache@v3 - working-directory: ./frontend with: path: | .next/cache @@ -104,17 +105,11 @@ jobs: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}- - name: Install dependencies run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} - working-directory: ./frontend - name: Build with Next.js run: ${{ steps.detect-package-manager.outputs.runner }} next build - working-directory: ./frontend - - name: Static HTML export with Next.js - working-directory: ./frontend - run: ${{ steps.detect-package-manager.outputs.runner }} next export - name: Upload artifact - working-directory: ./frontend uses: actions/upload-pages-artifact@v3 with: path: ./out