4
4
workflow_dispatch :
5
5
6
6
env :
7
+ NODE_ENV : production
7
8
NODE_VERSION : 18.16.1
8
9
PNPM_VERSION : 8.7.1
9
10
NEXT_VERSION : v13.5.1-netlify
15
16
NETLIFY_SITE_ID : 1d5a5c76-d445-4ae5-b694-b0d3f2e2c395
16
17
17
18
jobs :
19
+ build-runtime :
20
+ name : build runtime
21
+ runs-on : ubuntu-latest
22
+ steps :
23
+ - name : checkout repo
24
+ uses : actions/checkout@v3
25
+
26
+ - name : setup node
27
+ uses : actions/setup-node@v3
28
+ with :
29
+ node-version : ${{ env.NODE_VERSION }}
30
+
31
+ - name : cache dependencies
32
+ uses : actions/cache@v3
33
+ with :
34
+ path : node_modules
35
+ key : cache-${{ env.NODE_VERSION }}-${{ hashFiles('package-lock.json') }}
36
+ restore-keys : |
37
+ cache-${{ env.NODE_VERSION }}-
38
+
39
+ - name : install runtime
40
+ run : npm install
41
+
42
+ - name : build runtime
43
+ run : npm run build
44
+
45
+ - name : upload runtime
46
+ uses : actions/upload-artifact@v3
47
+ with :
48
+ path : ' **'
49
+
18
50
test-e2e :
19
51
name : test e2e
52
+ needs : [build-runtime]
20
53
runs-on : ubuntu-latest
21
54
timeout-minutes : 25
22
55
strategy :
26
59
steps :
27
60
- name : get github token
28
61
uses : navikt/github-app-token-generator@v1
29
- id : get- token
62
+ id : token
30
63
with :
31
64
private-key : ${{ secrets.TOKENS_PRIVATE_KEY }}
32
65
app-id : ${{ secrets.TOKENS_APP_ID }}
36
69
uses : actions/checkout@v3
37
70
with :
38
71
repository : ${{ env.NEXT_REPO }}
39
- token : ${{ steps.get- token.outputs.token }}
72
+ token : ${{ steps.token.outputs.token }}
40
73
ref : ${{ env.NEXT_VERSION }}
41
74
42
- - name : checkout runtime repo
43
- uses : actions/checkout@v3
44
- with :
45
- path : packages/next-runtime
46
-
47
75
- name : setup pnpm
48
76
uses : pnpm/action-setup@v2
49
77
with :
@@ -55,20 +83,16 @@ jobs:
55
83
node-version : ${{ env.NODE_VERSION }}
56
84
cache : pnpm
57
85
58
- # - name: enable yarn support
59
- # run: corepack enable yarn
60
-
61
- - name : install
62
- run : pnpm install --no-frozen-lockfile
86
+ - name : install next
87
+ run : pnpm install
63
88
64
- - name : build
89
+ - name : build next
65
90
run : pnpm build
66
91
67
- # - name: install playwright deps
68
- # run: pnpm playwright install-deps
69
-
70
- # - name: install chromium
71
- # run: pnpm playwright install chromium
92
+ - name : download next runtime
93
+ uses : actions/download-artifact@v3
94
+ with :
95
+ path : packages/next-runtime
72
96
73
97
- name : add netlify cli
74
98
run : pnpm add -g netlify-cli
0 commit comments