Skip to content

Commit b5b6bc8

Browse files
committed
use correct branch
1 parent d70c5af commit b5b6bc8

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.github/workflows/deploy-preview.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ jobs:
2626
name: Deploy Preview
2727
runs-on: ubuntu-latest
2828
steps:
29-
- name: Checkout repository
29+
- name: Checkout PR branch for cache restore
30+
if: inputs.action == 'create'
3031
uses: actions/checkout@v4
3132
with:
3233
token: ${{ secrets.TOKEN }}
33-
ref: gh-pages
34-
path: gh-pages
34+
ref: ${{ inputs.commit_sha }}
3535

3636
- name: Setup Node.js
3737
uses: actions/setup-node@v4
@@ -49,6 +49,13 @@ jobs:
4949
restore-keys: |
5050
docs-build-
5151
52+
- name: Checkout gh-pages branch
53+
uses: actions/checkout@v4
54+
with:
55+
token: ${{ secrets.TOKEN }}
56+
ref: gh-pages
57+
path: gh-pages
58+
5259
- name: Create preview directory and copy files
5360
if: inputs.action == 'create'
5461
run: |

0 commit comments

Comments
 (0)