Skip to content

Commit

Permalink
fix: Correctly setup /latest and /next folders (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr authored Jul 18, 2024
1 parent c7d6578 commit 2bf5916
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
find examples -type f -name "*.json" -delete
# Copy across new version to maintain a stable reference URL at /latest
rm -rf latest/*
mkdir -p "$GITHUB_WORKSPACE/latest"
cp -r "$GITHUB_WORKSPACE/v${{ steps.version_check.outputs.version }} "$GITHUB_WORKSPACE/latest"
- name: Checkout Dist Branch
Expand All @@ -61,6 +61,10 @@ jobs:
git fetch origin dist
git checkout -b dist origin/dist
- name: Cleanup old /latest folder
if: steps.version_check.outputs.changed == 'true'
run: rm -rf latest/*

- name: Commit and Push Changes
if: steps.version_check.outputs.changed == 'true'
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/update-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:

- name: Move JSON schema files to /@next folder
run: |
mkdir -p "$GITHUB_WORKSPACE/${{ env.VERSION }}"
mv schemas/* "$GITHUB_WORKSPACE/${{ env.VERSION }}"
mv types/* "$GITHUB_WORKSPACE/${{ env.VERSION }}/types"
Expand Down

0 comments on commit 2bf5916

Please sign in to comment.