Skip to content

Commit 7fe2fd9

Browse files
Update nextjs.yml
1 parent e3609b7 commit 7fe2fd9

File tree

1 file changed

+4
-18
lines changed

1 file changed

+4
-18
lines changed

.github/workflows/nextjs.yml

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,22 @@
1-
# Sample workflow for building and deploying a Next.js site to GitHub Pages
2-
#
3-
# To get started with Next.js see: https://nextjs.org/docs/getting-started
4-
#
51
name: Deploy Next.js site to Pages
62

73
on:
8-
# Runs on pushes targeting the default branch
94
push:
105
branches: ["main"]
11-
12-
# Allows you to run this workflow manually from the Actions tab
136
workflow_dispatch:
147

15-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
168
permissions:
179
contents: read
1810
pages: write
1911
id-token: write
2012

21-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
22-
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
2313
concurrency:
2414
group: "pages"
2515
cancel-in-progress: false
2616

2717
jobs:
28-
# Build job
2918
build:
3019
runs-on: ubuntu-latest
31-
3220
defaults:
3321
run:
3422
working-directory: ./tensorsofthewall
@@ -60,6 +48,7 @@ jobs:
6048
with:
6149
node-version: "lts/*"
6250
cache: ${{ steps.detect-package-manager.outputs.manager }}
51+
cache-dependency-path: './tensorsofthewall/package-lock.json'
6352

6453
- name: Setup Pages
6554
uses: actions/configure-pages@v4
@@ -68,12 +57,10 @@ jobs:
6857
uses: actions/cache@v4
6958
with:
7059
path: |
71-
.next/cache
72-
# Generate a new cache whenever packages or source files change.
73-
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
74-
# If source files changed but packages didn't, rebuild from a prior cache.
60+
./tensorsofthewall/.next/cache
61+
key: ${{ runner.os }}-nextjs-${{ hashFiles('./tensorsofthewall/**/package-lock.json', './tensorsofthewall/**/yarn.lock') }}-${{ hashFiles('./tensorsofthewall/**.[jt]s', './tensorsofthewall/**.[jt]sx') }}
7562
restore-keys: |
76-
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
63+
${{ runner.os }}-nextjs-${{ hashFiles('./tensorsofthewall/**/package-lock.json', './tensorsofthewall/**/yarn.lock') }}-
7764
7865
- name: Install dependencies
7966
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
@@ -86,7 +73,6 @@ jobs:
8673
with:
8774
path: ./tensorsofthewall/out
8875

89-
# Deployment job
9076
deploy:
9177
environment:
9278
name: github-pages

0 commit comments

Comments
 (0)