Skip to content

Commit c928244

Browse files
jongwoooovflowd
andauthored
ci: Use gatsby-cache action to cache gatsby build outputs (nodejs#3033)
Signed-off-by: jongwooo <jongwooo.han@gmail.com> Signed-off-by: jongwooo <jongwooo.han@gmail.com> Co-authored-by: Claudio Wunder <cwunder@gnome.org>
1 parent ae2b86b commit c928244

5 files changed

Lines changed: 12 additions & 40 deletions

File tree

.github/workflows/firebase-deployment.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,9 @@ jobs:
2626
- name: Install NPM packages
2727
run: npm ci
2828

29-
- name: Gatsby Cache Folder
30-
uses: actions/cache@v3
29+
- uses: jongwooo/gatsby-cache@v1.1.0
3130
with:
32-
key: cache-folder-ubuntu-latest
33-
path: .cache
34-
35-
- name: Gatsby Public Folder
36-
uses: actions/cache@v3
37-
with:
38-
key: public-folder-ubuntu-latest
39-
path: public
31+
key: firebase-deployment-gatsby-ubuntu-latest
4032

4133
- name: Build Gatsby
4234
run: npm run build-ci

.github/workflows/generate-preview.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ jobs:
5151
- name: Install NPM packages
5252
run: npm ci
5353

54+
- uses: jongwooo/gatsby-cache@v1.1.0
55+
with:
56+
key: generate-preview-gatsby-ubuntu-latest
57+
5458
- name: Build Gatsby
5559
run: npm run build-ci
5660
env:

.github/workflows/github-pages.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,9 @@ jobs:
3030
- name: Install NPM packages
3131
run: npm ci
3232

33-
- name: Gatsby Cache Folder
34-
uses: actions/cache@v3
33+
- uses: jongwooo/gatsby-cache@v1.1.0
3534
with:
36-
key: cache-folder-ubuntu-latest
37-
path: .cache
38-
39-
- name: Gatsby Public Folder
40-
uses: actions/cache@v3
41-
with:
42-
key: public-folder-ubuntu-latest
43-
path: public
35+
key: github-pages-gatsby-ubuntu-latest
4436

4537
- name: Build Gatsby
4638
run: npm run build-ci

.github/workflows/pull-request.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,9 @@ jobs:
5858
- name: Install NPM packages
5959
run: npm ci
6060

61-
- name: Gatsby Cache Folder
62-
uses: actions/cache@v3
61+
- uses: jongwooo/gatsby-cache@v1.1.0
6362
with:
64-
key: cache-folder-${{ matrix.os }}
65-
path: .cache
66-
67-
- name: Gatsby Public Folder
68-
uses: actions/cache@v3
69-
with:
70-
key: public-folder-${{ matrix.os }}
71-
path: public
63+
key: pull-request-gatsby-ubuntu-latest
7264

7365
- name: Build Gatsby
7466
run: npm run build-ci

.github/workflows/sync-api.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,9 @@ jobs:
3434
- name: Lint Markdown files
3535
run: npm run lint:md
3636

37-
- name: Gatsby Cache Folder
38-
uses: actions/cache@v3
37+
- uses: jongwooo/gatsby-cache@v1.1.0
3938
with:
40-
key: cache-folder-ubuntu-latest
41-
path: .cache
42-
43-
- name: Gatsby Public Folder
44-
uses: actions/cache@v3
45-
with:
46-
key: public-folder-ubuntu-latest
47-
path: public
39+
key: sync-api-gatsby-ubuntu-latest
4840

4941
- name: Build Gatsby
5042
run: npm run build-ci

0 commit comments

Comments
 (0)