chore(deps): bump @remix-run/*
to 0.0.0-nightly-966bcb4-20231206 (#…
#4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ♻️ Purge Cloudflare cache | |
on: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
purge: | |
name: ♻️ Purge Cloudflare cache | |
runs-on: ubuntu-latest | |
steps: | |
- name: ⬇️ Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: ⎔ Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: 📥 Install dependencies | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
run_install: | | |
- recursive: true | |
args: [--frozen-lockfile, --strict-peer-dependencies] | |
- name: 📦 Build current commit | |
run: | | |
pnpm run build | |
mv ./build ./current | |
- name: 📦 Build previous commit | |
run: | | |
git checkout HEAD^ | |
pnpm install --frozen-lockfile --strict-peer-dependencies | |
pnpm run build | |
mv ./build ./previous | |
- name: 📝 Generate diff | |
id: diff | |
run: | | |
DIFF=$(diff -qr ./current ./previous) | |
if [ -z "$DIFF" ]; then | |
echo "has_diff=false" >> $GITHUB_OUTPUT | |
else | |
echo "has_diff=true" >> $GITHUB_OUTPUT | |
fi | |
- name: ♻️ Purge Cloudflare cache | |
uses: jakejarvis/cloudflare-purge-action@v0.3.0 | |
if: steps.diff.outputs.has_diff == 'true' | |
env: | |
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }} | |
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }} | |
PURGE_URLS: '["https://www.mcan.sh", "https://www.mcan.sh/resume", "https://www.mcan.sh/resume.pdf"]' |