-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: purge cloudflare cache when changes to app dir
Signed-off-by: Logan McAnsh <logan@mcan.sh>
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: ♻️ Purge Cloudflare cache | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
deploy: | ||
name: ♻️ Purge Cloudflare cache | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: 📝 Get changed files | ||
id: changed-files | ||
uses: tj-actions/changed-files@v40.2.1 | ||
with: | ||
path: "./app" | ||
|
||
- name: ♻️ Purge Cloudflare cache | ||
if: ${{ github.ref == 'refs/heads/main' }} && steps.changed-files.outputs.any_changed == 'true' | ||
uses: jakejarvis/cloudflare-purge-action@v0.3.0 | ||
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"]' |