Skip to content

Commit 5bf843d

Browse files
committed
Cache yarn:build
1 parent b858f67 commit 5bf843d

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/deploy.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
runs-on: ubuntu-latest
2626
steps:
2727
- uses: actions/checkout@v5
28+
2829
- name: Parse .tool-versions
2930
uses: ./.github/actions/parse-tool-versions
3031
id: tool-versions
@@ -35,7 +36,14 @@ jobs:
3536
- run: node -v
3637
- run: yarn set version ${{ fromJSON(steps.tool-versions.outputs.versions).yarn }}
3738
- run: yarn install --inmutable
38-
- run: yarn build:prod
39+
- uses: actions/cache@v4
40+
id: cache-dist
41+
with:
42+
path: dist
43+
key: dist-${{ hashFiles('**/yarn.lock', '**/src/**') }}
44+
- name: Build production bundle
45+
if: steps.cache-dist.outputs.cache-hit != 'true'
46+
run: yarn build:prod
3947
- name: Upload dist bundle
4048
uses: actions/upload-artifact@v4
4149
with:

0 commit comments

Comments
 (0)