Skip to content

Commit

Permalink
Create check-and-purge-cdn-cache.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
xixu-me committed Nov 2, 2024
1 parent 7f18ef5 commit ec1c7d7
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/check-and-purge-cdn-cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Check and Purge CDN Cache

on:
push:
branches:
- script

jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x

- name: Run script
run: node META.js

purge-dns-cache:
runs-on: ubuntu-latest
needs: check

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Purge CDN cache
run: |
for file in $(ls); do
curl -i "https://purge.jsdelivr.net/gh/${{ github.repository }}@script/${file}"
done

0 comments on commit ec1c7d7

Please sign in to comment.