Skip to content

Commit a973042

Browse files
committed
Fix deploy-preview order
1 parent 16bad80 commit a973042

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

.github/workflows/deploy-preview.yaml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,20 @@ jobs:
3838
with:
3939
node-version: 20
4040

41-
- name: Restore docs build output
41+
- name: Create preview directory and restore build
42+
if: inputs.action == 'create'
43+
run: |
44+
mkdir -p gh-pages/preview/PR${{ inputs.pr_number }}
45+
46+
- name: Restore docs build output to preview directory
4247
if: inputs.action == 'create'
4348
uses: actions/cache@v4
4449
with:
45-
path: build/docs/gatsby/public
50+
path: gh-pages/preview/PR${{ inputs.pr_number }}
4651
key: docs-build-${{ inputs.commit_sha }}
4752
restore-keys: |
4853
docs-build-
4954
50-
- name: Create preview directory
51-
if: inputs.action == 'create'
52-
run: |
53-
mkdir -p gh-pages/preview/PR${{ inputs.pr_number }}
54-
cp -r build/docs/gatsby/public/* gh-pages/preview/PR${{ inputs.pr_number }}/
55-
5655
- name: Remove preview directory
5756
if: inputs.action == 'delete'
5857
run: |

0 commit comments

Comments
 (0)