Skip to content

Commit df31346

Browse files
updated actions again again
1 parent 8267db2 commit df31346

File tree

2 files changed

+92
-46
lines changed

2 files changed

+92
-46
lines changed

.github/workflows/main.yaml

+46-23
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,31 @@ jobs:
1818
- uses: actions/setup-node@v3
1919
with:
2020
node-version: 20
21-
cache: "yarn"
2221

23-
# Create .npmrc before yarn install but with escaped token
2422
- name: Create .npmrc for Tiptap
2523
run: |
2624
echo "@tiptap-pro:registry=https://registry.tiptap.dev/" > .npmrc
2725
echo "//registry.tiptap.dev/:_authToken=\"$TIPTAP_PRO_TOKEN\"" >> .npmrc
2826
env:
2927
TIPTAP_PRO_TOKEN: ${{ secrets.TIPTAP_PRO_TOKEN }}
3028

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
3332

34-
- name: Cache Build
35-
uses: actions/cache@v3
33+
- uses: actions/cache@v3
34+
id: yarn-cache
3635
with:
3736
path: |
38-
.next
37+
${{ steps.yarn-cache-dir-path.outputs.dir }}
3938
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
4146

4247
Check:
4348
needs: Setup
@@ -48,7 +53,6 @@ jobs:
4853
- uses: actions/setup-node@v3
4954
with:
5055
node-version: 20
51-
cache: "yarn"
5256

5357
- name: Create .npmrc for Tiptap
5458
run: |
@@ -57,13 +61,20 @@ jobs:
5761
env:
5862
TIPTAP_PRO_TOKEN: ${{ secrets.TIPTAP_PRO_TOKEN }}
5963

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
6270
with:
6371
path: |
64-
.next
72+
${{ steps.yarn-cache-dir-path.outputs.dir }}
6573
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-
6778
6879
- name: Type Check
6980
run: yarn run tsc
@@ -80,7 +91,6 @@ jobs:
8091
- uses: actions/setup-node@v3
8192
with:
8293
node-version: 20
83-
cache: "yarn"
8494

8595
- name: Create .npmrc for Tiptap
8696
run: |
@@ -89,13 +99,20 @@ jobs:
8999
env:
90100
TIPTAP_PRO_TOKEN: ${{ secrets.TIPTAP_PRO_TOKEN }}
91101

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
94108
with:
95109
path: |
96-
.next
110+
${{ steps.yarn-cache-dir-path.outputs.dir }}
97111
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-
99116
100117
- name: Push DB Changes
101118
run: yarn run db:push
@@ -109,7 +126,6 @@ jobs:
109126
- uses: actions/setup-node@v3
110127
with:
111128
node-version: 20
112-
cache: "yarn"
113129

114130
- name: Create .npmrc for Tiptap
115131
run: |
@@ -118,13 +134,20 @@ jobs:
118134
env:
119135
TIPTAP_PRO_TOKEN: ${{ secrets.TIPTAP_PRO_TOKEN }}
120136

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
123143
with:
124144
path: |
125-
.next
145+
${{ steps.yarn-cache-dir-path.outputs.dir }}
126146
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-
128151
129152
- name: Install Vercel CLI
130153
run: yarn global add vercel@latest

.github/workflows/preview.yaml

+46-23
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,31 @@ jobs:
1818
- uses: actions/setup-node@v3
1919
with:
2020
node-version: 20
21-
cache: "yarn"
2221

23-
# Create .npmrc before yarn install but with escaped token
2422
- name: Create .npmrc for Tiptap
2523
run: |
2624
echo "@tiptap-pro:registry=https://registry.tiptap.dev/" > .npmrc
2725
echo "//registry.tiptap.dev/:_authToken=\"$TIPTAP_PRO_TOKEN\"" >> .npmrc
2826
env:
2927
TIPTAP_PRO_TOKEN: ${{ secrets.TIPTAP_PRO_TOKEN }}
3028

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
3332

34-
- name: Cache Build
35-
uses: actions/cache@v3
33+
- uses: actions/cache@v3
34+
id: yarn-cache
3635
with:
3736
path: |
38-
.next
37+
${{ steps.yarn-cache-dir-path.outputs.dir }}
3938
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
4146

4247
Check:
4348
needs: Setup
@@ -48,7 +53,6 @@ jobs:
4853
- uses: actions/setup-node@v3
4954
with:
5055
node-version: 20
51-
cache: "yarn"
5256

5357
- name: Create .npmrc for Tiptap
5458
run: |
@@ -57,13 +61,20 @@ jobs:
5761
env:
5862
TIPTAP_PRO_TOKEN: ${{ secrets.TIPTAP_PRO_TOKEN }}
5963

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
6270
with:
6371
path: |
64-
.next
72+
${{ steps.yarn-cache-dir-path.outputs.dir }}
6573
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-
6778
6879
- name: Type Check
6980
run: yarn run tsc
@@ -80,7 +91,6 @@ jobs:
8091
- uses: actions/setup-node@v3
8192
with:
8293
node-version: 20
83-
cache: "yarn"
8494

8595
- name: Create .npmrc for Tiptap
8696
run: |
@@ -89,13 +99,20 @@ jobs:
8999
env:
90100
TIPTAP_PRO_TOKEN: ${{ secrets.TIPTAP_PRO_TOKEN }}
91101

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
94108
with:
95109
path: |
96-
.next
110+
${{ steps.yarn-cache-dir-path.outputs.dir }}
97111
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-
99116
100117
- name: Push DB Changes
101118
run: yarn run db:push
@@ -109,7 +126,6 @@ jobs:
109126
- uses: actions/setup-node@v3
110127
with:
111128
node-version: 20
112-
cache: "yarn"
113129

114130
- name: Create .npmrc for Tiptap
115131
run: |
@@ -118,13 +134,20 @@ jobs:
118134
env:
119135
TIPTAP_PRO_TOKEN: ${{ secrets.TIPTAP_PRO_TOKEN }}
120136

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
123143
with:
124144
path: |
125-
.next
145+
${{ steps.yarn-cache-dir-path.outputs.dir }}
126146
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-
128151
129152
- name: Install Vercel CLI
130153
run: yarn global add vercel@latest

0 commit comments

Comments
 (0)