Skip to content

Commit

Permalink
move to frontend before bulding
Browse files Browse the repository at this point in the history
  • Loading branch information
thearyadev committed Jan 21, 2024
1 parent 8452215 commit 55a1749
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand All @@ -93,7 +95,6 @@ jobs:
static_site_generator: next
- name: Restore cache
uses: actions/cache@v3
working-directory: ./frontend
with:
path: |
.next/cache
Expand All @@ -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
Expand Down

0 comments on commit 55a1749

Please sign in to comment.