Purge CDN after a new release (#45)

Co-authored-by: Loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
pull/48/head 202108281131
pzcn 2021-08-28 19:31:31 +08:00 committed by GitHub
parent 3231f9422a
commit 9666b73222
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -116,7 +116,7 @@ jobs:
- name: Git push assets to "release" branch
run: |
cd publish
cd publish || exit 1
git init
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
@ -125,3 +125,10 @@ jobs:
git commit -m "${{ env.RELEASE_NAME }}"
git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}"
git push -f origin release
- name: Purge jsdelivr CDN
run: |
cd publish || exit 1
for file in $(ls); do
curl -i "https://purge.jsdelivr.net/gh/${{ github.repository }}@release/${file}"
done