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
- #
5
1
name : Deploy Next.js site to Pages
6
2
7
3
on :
8
- # Runs on pushes targeting the default branch
9
4
push :
10
5
branches : ["main"]
11
-
12
- # Allows you to run this workflow manually from the Actions tab
13
6
workflow_dispatch :
14
7
15
- # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
16
8
permissions :
17
9
contents : read
18
10
pages : write
19
11
id-token : write
20
12
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.
23
13
concurrency :
24
14
group : " pages"
25
15
cancel-in-progress : false
26
16
27
17
jobs :
28
- # Build job
29
18
build :
30
19
runs-on : ubuntu-latest
31
-
32
20
defaults :
33
21
run :
34
22
working-directory : ./tensorsofthewall
60
48
with :
61
49
node-version : " lts/*"
62
50
cache : ${{ steps.detect-package-manager.outputs.manager }}
51
+ cache-dependency-path : ' ./tensorsofthewall/package-lock.json'
63
52
64
53
- name : Setup Pages
65
54
uses : actions/configure-pages@v4
@@ -68,12 +57,10 @@ jobs:
68
57
uses : actions/cache@v4
69
58
with :
70
59
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') }}
75
62
restore-keys : |
76
- ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
63
+ ${{ runner.os }}-nextjs-${{ hashFiles('./tensorsofthewall/ **/package-lock.json', './tensorsofthewall/ **/yarn.lock') }}-
77
64
78
65
- name : Install dependencies
79
66
run : ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
86
73
with :
87
74
path : ./tensorsofthewall/out
88
75
89
- # Deployment job
90
76
deploy :
91
77
environment :
92
78
name : github-pages
0 commit comments