Public CDN for static scripts and assets, served via jsDelivr.
This repo is write-only for humans — files are pushed here automatically by GitHub Actions workflows in other repos (primarily kwameandco/webstudio). You should never need to edit files here by hand.
https://cdn.jsdelivr.net/gh/kwameandco/cdn@main/<folder>/<file>
| Segment | Meaning |
|---|---|
kwameandco/cdn |
This repo |
@main |
Always serves the latest version on the main branch |
@v1.5.0 |
Pin to a specific git tag (never changes) |
Examples
https://cdn.jsdelivr.net/gh/kwameandco/cdn@main/kw-filter/kw-filter.min.js
https://cdn.jsdelivr.net/gh/kwameandco/cdn@main/kw-filter/kw-filter.js
jsDelivr caches @main for a few minutes. If a change isn't showing, purge it:
https://purge.jsdelivr.net/gh/kwameandco/cdn@main/<folder>/<file>
cdn/
└── kw-filter/
├── kw-filter.js ← unminified source (for debugging)
└── kw-filter.min.js ← minified (use this in production)
One folder per plugin or tool. Each folder should contain at minimum a minified file; include the unminified source too so it's inspectable from the browser.
Add your script at:
kwameandco/webstudio/plugins/<script-name>/<script-name>.js
Create .github/workflows/minify-<script-name>.yml:
name: Minify and publish <script-name>
on:
push:
branches:
- main
paths:
- 'plugins/<script-name>/<script-name>.js'
workflow_dispatch:
concurrency:
group: minify-<script-name>
cancel-in-progress: false
jobs:
minify-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Minify with Terser
run: |
npx --yes terser plugins/<script-name>/<script-name>.js \
--output plugins/<script-name>/<script-name>.min.js \
--compress \
--mangle \
--comments '/^!/'
- name: Push to public CDN repo
env:
CDN_PUSH_TOKEN: ${{ secrets.CDN_PUSH_TOKEN }}
run: |
git clone "https://x-access-token:${CDN_PUSH_TOKEN}@github.com/kwameandco/cdn.git" cdn-repo
mkdir -p cdn-repo/<script-name>
cp plugins/<script-name>/<script-name>.js cdn-repo/<script-name>/<script-name>.js
cp plugins/<script-name>/<script-name>.min.js cdn-repo/<script-name>/<script-name>.min.js
cd cdn-repo
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add <script-name>/
if ! git diff --staged --quiet; then
git commit -m "chore: sync <script-name> $(date -u +%Y-%m-%dT%H:%M:%SZ)"
git pull --rebase origin main
git push
fiReplace every <script-name> with your actual script name (e.g. kw-carousel).
The CDN_PUSH_TOKEN secret must exist in the webstudio repo settings (Settings → Secrets and variables → Actions). It is a fine-grained personal access token scoped to this repo (kwameandco/cdn) with Contents: Read and Write.
If the secret already exists for another script, no action needed — it's shared across all workflows.
Push your script to webstudio main. The workflow runs automatically. After ~2 minutes, the file should be live at:
https://cdn.jsdelivr.net/gh/kwameandco/cdn@main/<script-name>/<script-name>.min.js
Automated commits follow this pattern:
chore: sync <script-name> 2026-05-08T14:23:01Z
The timestamp is UTC ISO 8601 from the moment the workflow ran. This makes it easy to correlate a CDN push with the webstudio commit that triggered it.
To lock a URL to a specific point in time (e.g. for a production embed you don't want to auto-update):
- Create a git tag on this repo at the current commit:
v1.5.0,kw-filter-v1.5.0, etc. - Use the tag in the jsDelivr URL instead of
@main:
https://cdn.jsdelivr.net/gh/kwameandco/cdn@kw-filter-v1.5.0/kw-filter/kw-filter.min.js
Tags are immutable and cached permanently by jsDelivr — the URL will never change.