@@ -18,26 +18,31 @@ jobs:
18
18
- uses : actions/setup-node@v3
19
19
with :
20
20
node-version : 20
21
- cache : " yarn"
22
21
23
- # Create .npmrc before yarn install but with escaped token
24
22
- name : Create .npmrc for Tiptap
25
23
run : |
26
24
echo "@tiptap-pro:registry=https://registry.tiptap.dev/" > .npmrc
27
25
echo "//registry.tiptap.dev/:_authToken=\"$TIPTAP_PRO_TOKEN\"" >> .npmrc
28
26
env :
29
27
TIPTAP_PRO_TOKEN : ${{ secrets.TIPTAP_PRO_TOKEN }}
30
28
31
- - name : Install Dependencies
32
- run : yarn install --frozen-lockfile
29
+ - name : Get yarn cache directory path
30
+ id : yarn-cache-dir-path
31
+ run : echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
33
32
34
- - name : Cache Build
35
- uses : actions/ cache@v3
33
+ - uses : actions/cache@v3
34
+ id : yarn- cache
36
35
with :
37
36
path : |
38
- .next
37
+ ${{ steps.yarn-cache-dir-path.outputs.dir }}
39
38
node_modules
40
- key : ${{ runner.os }}-build-${{ hashFiles('**/yarn.lock') }}
39
+ .next
40
+ key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
41
+ restore-keys : |
42
+ ${{ runner.os }}-yarn-
43
+
44
+ - name : Install Dependencies
45
+ run : yarn install --frozen-lockfile
41
46
42
47
Check :
43
48
needs : Setup
48
53
- uses : actions/setup-node@v3
49
54
with :
50
55
node-version : 20
51
- cache : " yarn"
52
56
53
57
- name : Create .npmrc for Tiptap
54
58
run : |
@@ -57,13 +61,20 @@ jobs:
57
61
env :
58
62
TIPTAP_PRO_TOKEN : ${{ secrets.TIPTAP_PRO_TOKEN }}
59
63
60
- - name : Restore Cache
61
- uses : actions/cache@v3
64
+ - name : Get yarn cache directory path
65
+ id : yarn-cache-dir-path
66
+ run : echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
67
+
68
+ - uses : actions/cache@v3
69
+ id : yarn-cache
62
70
with :
63
71
path : |
64
- .next
72
+ ${{ steps.yarn-cache-dir-path.outputs.dir }}
65
73
node_modules
66
- key : ${{ runner.os }}-build-${{ hashFiles('**/yarn.lock') }}
74
+ .next
75
+ key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
76
+ restore-keys : |
77
+ ${{ runner.os }}-yarn-
67
78
68
79
- name : Type Check
69
80
run : yarn run tsc
80
91
- uses : actions/setup-node@v3
81
92
with :
82
93
node-version : 20
83
- cache : " yarn"
84
94
85
95
- name : Create .npmrc for Tiptap
86
96
run : |
@@ -89,13 +99,20 @@ jobs:
89
99
env :
90
100
TIPTAP_PRO_TOKEN : ${{ secrets.TIPTAP_PRO_TOKEN }}
91
101
92
- - name : Restore Cache
93
- uses : actions/cache@v3
102
+ - name : Get yarn cache directory path
103
+ id : yarn-cache-dir-path
104
+ run : echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
105
+
106
+ - uses : actions/cache@v3
107
+ id : yarn-cache
94
108
with :
95
109
path : |
96
- .next
110
+ ${{ steps.yarn-cache-dir-path.outputs.dir }}
97
111
node_modules
98
- key : ${{ runner.os }}-build-${{ hashFiles('**/yarn.lock') }}
112
+ .next
113
+ key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
114
+ restore-keys : |
115
+ ${{ runner.os }}-yarn-
99
116
100
117
- name : Push DB Changes
101
118
run : yarn run db:push
@@ -109,7 +126,6 @@ jobs:
109
126
- uses : actions/setup-node@v3
110
127
with :
111
128
node-version : 20
112
- cache : " yarn"
113
129
114
130
- name : Create .npmrc for Tiptap
115
131
run : |
@@ -118,13 +134,20 @@ jobs:
118
134
env :
119
135
TIPTAP_PRO_TOKEN : ${{ secrets.TIPTAP_PRO_TOKEN }}
120
136
121
- - name : Restore Cache
122
- uses : actions/cache@v3
137
+ - name : Get yarn cache directory path
138
+ id : yarn-cache-dir-path
139
+ run : echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
140
+
141
+ - uses : actions/cache@v3
142
+ id : yarn-cache
123
143
with :
124
144
path : |
125
- .next
145
+ ${{ steps.yarn-cache-dir-path.outputs.dir }}
126
146
node_modules
127
- key : ${{ runner.os }}-build-${{ hashFiles('**/yarn.lock') }}
147
+ .next
148
+ key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
149
+ restore-keys : |
150
+ ${{ runner.os }}-yarn-
128
151
129
152
- name : Install Vercel CLI
130
153
run : yarn global add vercel@latest
0 commit comments