Skip to content

Commit

Permalink
Merge d9ea5d1 into bf7169a
Browse files Browse the repository at this point in the history
  • Loading branch information
ogizanagi committed May 27, 2024
2 parents bf7169a + d9ea5d1 commit a0dd378
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
24 changes: 24 additions & 0 deletions .github/workflows/deploy_pr_preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,30 @@ jobs:
APP_GITHUB_REF: ${{ github.head_ref }}
ROUTER_DEFAULT_URI: https://elao.github.io/elao_/pr/${{ github.event.number }}

- name: 'Deduplicate images'
run: |
# Merge the resized images from PR build folder to the cached folder (`public/resized`)
rsync -a build/resized/ public/resized/
# Remove the build resized images folder
rm -rf build/resized/
# and symlink to the gh-pages root `resized` image folder
cd build
ln -sf ../../resized/ resized
- name: '🖼️ Push resized images'
uses: JamesIves/github-pages-deploy-action@v4
with:
commit-message: |
[AUTO] Deploy PR #${{ github.event.number }} images
for commit ${{ github.sha }}
branch: gh-pages
folder: public/resized
target-folder: resized
clean: false # Sync we rsynced the images to merge from all source, we'll never delete anything from here.

# https://github.com/marketplace/actions/deploy-to-github-pages
- name: '🚀 Deploy'
uses: JamesIves/github-pages-deploy-action@v4
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/deploy_staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,7 @@ jobs:
branch: gh-pages # The branch the action should deploy to.
folder: build # The folder the action should deploy.
clean: true # Automatically remove deleted files from the deploy branch
clean-exclude: 'pr/*' # Don't clean the PR deployments
# Don't clean the PR deployments nor their resized images
clean-exclude: |
pr/*
resized/*

0 comments on commit a0dd378

Please sign in to comment.