Skip to content

feat: remove spaces from file names #5

feat: remove spaces from file names

feat: remove spaces from file names #5

Workflow file for this run

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 scripts -name "*.js" -type f`; do
urls+="${baseUrl}/${f},"
done
for f in `find styles -name "*.css" -type f`; do
urls+="${baseUrl}/${f},"
done
for f in `find styles -name "*.css.map" -type f`; do
urls+="${baseUrl}/${f},"
done
for f in `find images -name "*.png" -type f`; do
urls+="${baseUrl}/${f},"
done
for f in `find images -name "*.jpg" -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 }}