Skip to content

Commit

Permalink
Merge pull request #2097 from arduino/serjlee/maybe-fix-caches
Browse files Browse the repository at this point in the history
Use per-branch cache during builds
  • Loading branch information
Serjlee authored Aug 5, 2024
2 parents 925ba8b + 1b80571 commit 1f9528f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,18 @@ jobs:
id: gatsby-cache-folder
with:
path: .cache
key: ${{ runner.os }}-cache-gatsby-${{ github.sha }}
key: ${{ runner.os }}-cache-gatsby-${{ github.ref }}
restore-keys: |
${{ runner.os }}-cache-gatsby-
${{ runner.os }}-cache-gatsby-main
- name: Gatsby Public Folder
uses: actions/cache@v4
id: gatsby-public-folder
with:
path: public/
key: ${{ runner.os }}-public-gatsby-${{ github.sha }}
key: ${{ runner.os }}-public-gatsby-${{ github.ref }}
restore-keys: |
${{ runner.os }}-public-gatsby-
${{ runner.os }}-public-gatsby-main
- run: npm install
- run: npm run build
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,18 @@ jobs:
id: gatsby-cache-folder
with:
path: .cache
key: ${{ runner.os }}-cache-gatsby-${{ github.sha }}
key: ${{ runner.os }}-cache-gatsby-${{ github.ref }}
restore-keys: |
${{ runner.os }}-cache-gatsby-
${{ runner.os }}-cache-gatsby-main
- name: Gatsby Public Folder
uses: actions/cache@v4
id: gatsby-public-folder
with:
path: public/
key: ${{ runner.os }}-public-gatsby-${{ github.sha }}
key: ${{ runner.os }}-public-gatsby-${{ github.ref }}
restore-keys: |
${{ runner.os }}-public-gatsby-
${{ runner.os }}-public-gatsby-main
- run: npm install
- run: npm run build
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,18 @@ jobs:
id: gatsby-cache-folder
with:
path: .cache
key: ${{ runner.os }}-cache-gatsby-${{ github.sha }}
key: ${{ runner.os }}-cache-gatsby-${{ github.ref }}
restore-keys: |
${{ runner.os }}-cache-gatsby-
${{ runner.os }}-cache-gatsby-main
- name: Gatsby Public Folder
uses: actions/cache@v4
id: gatsby-public-folder
with:
path: public/
key: ${{ runner.os }}-public-gatsby-${{ github.sha }}
key: ${{ runner.os }}-public-gatsby-${{ github.ref }}
restore-keys: |
${{ runner.os }}-public-gatsby-
${{ runner.os }}-public-gatsby-main
- run: npm install
- run: npm run build
Expand Down Expand Up @@ -135,4 +135,4 @@ jobs:
body: |
## Preview Deployment
🚀 Preview this PR: ${{ steps.url_preview.outputs.NETLIFY_PREVIEW_URL }}
📍 Commit SHA: ${{ github.sha }}
📍 Commit SHA: ${{ github.sha }}

0 comments on commit 1f9528f

Please sign in to comment.