Update the repository field in package.json with your actual GitHub repository URL:
{
"repository": {
"type": "git",
"url": "https://github.com/your-org/webflow-university.git"
}
}Or if using SSH:
{
"repository": {
"type": "git",
"url": "git@github.com:your-org/webflow-university.git"
}
}- Go to repository Settings → Actions → General
- Ensure "Allow all actions and reusable workflows" is enabled
- Set "Workflow permissions" to "Read and write permissions"
- Go to Settings → Branches
- Add a rule for
mainbranch:- ✅ Require a pull request before merging
- ✅ Require approvals (1 or more)
- ✅ Require status checks to pass (select
lint-and-typecheckandbuild) - ✅ Require branches to be up to date before merging
- ✅ Require conversation resolution before merging
- ✅ Do not allow bypassing the above settings
- ✅ Restrict pushes that create matching branches (prevents direct pushes)
- ❌ Do NOT allow force pushes
- ❌ Do NOT allow deletions
📖 For detailed setup instructions, see GITHUB_SETUP.md
Why? This prevents accidental direct pushes, ensures code is reviewed, and guarantees CI passes before merging.
After your first push to main:
-
Create an initial changeset:
pnpm changeset
- Select
scriptspackage - Choose version bump type
- Write initial changelog
- Select
-
Commit and push:
git add . git commit -m "chore: initial changeset" git push origin main
-
The GitHub Action will create a version PR automatically
-
Merge the version PR to trigger the first release
After your first commit, verify the jsdelivr URL works:
node scripts/deploy-info.jsTest the URL in a browser or with curl:
curl https://cdn.jsdelivr.net/gh/your-org/webflow-university@main/packages/scripts/dist/index.jsIf not already set up:
# Install Webflow CLI globally (if needed)
npm install -g @webflow/cli
# Authenticate
npx webflow login
# Link your library
cd packages/code-components
npx webflow library share-
Clone the repository:
git clone <repository-url> cd webflow-university
-
Install dependencies:
pnpm install
-
Verify setup:
pnpm build pnpm lint pnpm check
-
Read the documentation:
- README.md - Overview and workflows
- CONTRIBUTING.md - Development guidelines
-
Test the development workflow:
# Test scripts package pnpm dev:scripts # In another terminal, test the served files # Test code-components pnpm dev:components
- Create file in
packages/scripts/src/ - Export from
packages/scripts/src/index.tsif needed - Build:
pnpm build:scripts - Test locally:
pnpm dev:scripts
- Create component in
packages/code-components/src/components/ - Export from appropriate file
- Build:
pnpm build:components - Share with Webflow:
npx webflow library share
Scripts are automatically deployed via jsdelivr when:
- Code is pushed to
main - A GitHub release is created
To deploy manually:
- Build:
pnpm build:scripts - Commit and push to
main - Use jsdelivr URL with commit hash or branch name
- Make your changes
- Create changeset:
pnpm changeset - Commit and push
- Merge PR
- Version PR will be created automatically
- Merge version PR to release
# Clean and rebuild
pnpm clean
pnpm install
pnpm build- jsdelivr caches files. Use a specific commit hash instead of branch name
- Or wait a few minutes for cache to clear
- Check the URL is correct:
node scripts/deploy-info.js
- Ensure you're on
mainbranch - Check
.changeset/config.jsonexists - Verify changeset files are in
.changeset/directory - Check GitHub Actions logs for errors
- Check repository settings (Actions enabled, permissions)
- Verify
pnpm-lock.yamlis committed - Check workflow files for syntax errors
- Review Actions logs for specific errors
- ✅ Update repository URL in
package.json - ✅ Configure GitHub repository settings
- ✅ Create initial changeset
- ✅ Push to GitHub
- ✅ Verify CI/CD workflows run
- ✅ Test jsdelivr URLs
- ✅ Share with team