Skip to content

Commit 6da1858

Browse files
authored
Update nextjs.yml
1 parent 6e053f2 commit 6da1858

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/nextjs.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ jobs:
3434
- name: Detect package manager
3535
id: detect-package-manager
3636
run: |
37-
if [ -f "${{ github.workspace }}/yarn.lock" ]; then
37+
if [ -f "${{ github.workspace }}/frontend/yarn.lock" ]; then
3838
echo "manager=yarn" >> $GITHUB_OUTPUT
3939
echo "command=install" >> $GITHUB_OUTPUT
4040
echo "runner=yarn" >> $GITHUB_OUTPUT
4141
exit 0
42-
elif [ -f "${{ github.workspace }}/package.json" ]; then
42+
elif [ -f "${{ github.workspace }}/frontend/package.json" ]; then
4343
echo "manager=npm" >> $GITHUB_OUTPUT
4444
echo "command=ci" >> $GITHUB_OUTPUT
4545
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
@@ -65,20 +65,20 @@ jobs:
6565
uses: actions/cache@v4
6666
with:
6767
path: |
68-
.next/cache
68+
frontend/.next/cache
6969
# Generate a new cache whenever packages or source files change.
70-
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
70+
key: ${{ runner.os }}-nextjs-${{ hashFiles('frontend/**/package-lock.json', 'frontend/**/yarn.lock') }}-${{ hashFiles('frontend/**.[jt]s', 'frontend/**.[jt]sx') }}
7171
# If source files changed but packages didn't, rebuild from a prior cache.
7272
restore-keys: |
73-
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
73+
${{ runner.os }}-nextjs-${{ hashFiles('frontend/**/package-lock.json', 'frontend/**/yarn.lock') }}-
7474
- name: Install dependencies
7575
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
7676
- name: Build with Next.js
7777
run: ${{ steps.detect-package-manager.outputs.runner }} next build
7878
- name: Upload artifact
7979
uses: actions/upload-pages-artifact@v3
8080
with:
81-
path: ./out
81+
path: frontend/.out
8282

8383
# Deployment job
8484
deploy:

0 commit comments

Comments
 (0)