bug: update GHA #2
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 JSdelivr Cache | |
on: | |
push: | |
branches: | |
- main | |
- master | |
- develop | |
workflow_dispatch: | |
jobs: | |
purge: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout main | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.ref }} | |
- name: Determine CDN URLs to Purge | |
id: purge_urls | |
run: | | |
baseUrl="https://cdn.jsdelivr.net/gh/${{ github.repository }}@main" | |
urls="" | |
for f in `find dist -name "*.js" -type f`; do | |
urls+="${baseUrl}/${f}," | |
done | |
echo "urls=${urls%,*}" >> $GITHUB_OUTPUT | |
- name: Purge CDN Caches | |
uses: egad13/purge-jsdelivr-cache@v1 | |
with: | |
url: ${{ steps.purge_urls.outputs.urls }} |