This directory contains GitHub Actions workflows that automatically handle design token building and Storybook deployment.
Triggers:
- Push to
mainbranch - Changes to
tokens/directory - Changes to
build/manifest.json - Changes to
scripts/build-tokens.js
What it does:
- Installs dependencies
- Runs
node scripts/build-tokens.js - Commits updated CSS files to
styles/ - Comments on pull requests with status
Output:
- Updated CSS files in
styles/directory - Automatic commit with message: "🤖 Auto-build: Update design tokens CSS files"
Triggers:
- Push to
mainbranch (when CSS/components change) - Completion of "Build Design Tokens" workflow
What it does:
- Installs dependencies
- Runs
npm run build-storybook - Deploys to GitHub Pages
- Updates live Storybook documentation
Output:
- Live Storybook at GitHub Pages URL
- Automatic updates when tokens change
- Go to repository Settings → Pages
- Source: "GitHub Actions"
- Save settings
# Make a small token change
echo '{"color": {"test": {"500": {"$value": "#ff0000"}}}}' >> tokens/t1-primitives/color.json
# Commit and push
git add .
git commit -m "test automation"
git push
# Check Actions tab for workflow runsEdit deploy-storybook.yml:
cname: your-domain.comThe workflows use GITHUB_TOKEN with these permissions:
contents: write- To commit CSS filespages: write- To deploy Storybookpull-requests: write- To comment on PRs
- Check repository has Actions enabled
- Verify file paths in workflow triggers
- Ensure you're pushing to
mainbranch
- Check
scripts/build-tokens.jsruns successfully - Verify token file syntax is valid JSON
- Check
build/manifest.jsonconfiguration
- Enable GitHub Pages in repository settings
- Check Pages source is set to "GitHub Actions"
- Verify
npm run build-storybookworks locally
# Reinstall husky
npm uninstall husky
npm install --save-dev husky
npm run setup:automation- Go to repository → Actions tab
- View "Build Design Tokens" runs
- Check "Deploy Storybook" runs
- URL:
https://uxdelta.github.io/muka/ - Updates automatically when tokens change
- Click on any workflow run
- Expand steps to see detailed logs
- Check for error messages
✅ No Manual Rebuilds - Tokens update automatically
✅ Consistent Deployments - Same process every time
✅ Team Collaboration - Everyone gets latest tokens
✅ Documentation Always Current - Storybook stays updated
✅ Error Prevention - Automated validation and testing
This automation ensures your design system stays synchronized across all environments automatically.