This directory contains automated workflows for continuous integration and deployment (CI/CD) of the Yaya Starchild website.
Triggers: Push to main branch, manual dispatch
Jobs:
-
Validate - Code quality checks
- HTML syntax validation
- JavaScript syntax validation
- Product data structure validation
- File size monitoring
- Critical files verification
-
Build - Production build
- Install dependencies
- Remove test files
- Build static site
- Verify critical files
-
Deploy - GitHub Pages deployment
- Upload production artifact
- Deploy to GitHub Pages
- Report deployment URL
-
Smoke Test - Post-deployment validation
- Test homepage accessibility
- Test shop page accessibility
- Verify critical assets loaded
Triggers: Pull request opened/updated to main
Checks:
- ✅ HTML syntax and structure
- ✅ JavaScript syntax
- ✅ No console.log spam (warnings)
- ✅ Product data integrity
- ✅ File size limits
- ✅ Build process succeeds
- ✅ Critical files present
- ✅ No sensitive data (API keys, passwords)
Result: PR cannot merge if validation fails
-
Enable GitHub Pages
- Go to repository Settings → Pages
- Source: GitHub Actions
- Save
-
Configure Permissions
- Go to Settings → Actions → General
- Workflow permissions: Read and write permissions
- Allow GitHub Actions to create PRs: ✅
- Save
-
Verify Secrets (if needed)
- Go to Settings → Secrets and variables → Actions
- Add any required secrets (currently none needed)
-
Test PR Validation
git checkout -b test/validation git push origin test/validation # Create PR on GitHub # Watch Actions tab for validation
-
Test Deployment
git checkout main git push origin main # Watch Actions tab for deployment
Check workflow status at:
https://github.com/JasmineART/Yaya/actions
- Check if GitHub Actions is enabled in repository settings
- Verify workflow file syntax (YAML formatting)
- Check repository permissions
Common Issues:
- Missing permissions → Fix in Settings → Actions
- Invalid YAML → Check workflow file syntax
- Build errors → Run
npm run validatelocally - Missing files → Check critical files list
- Run
npm run validatelocally to see errors - Fix errors shown in validation output
- Push fixes to PR branch
- Validation re-runs automatically
- Wait 2-3 minutes for propagation
- Check Actions tab for deployment status
- Clear browser cache (Ctrl+Shift+R)
- Verify Pages settings in repository
┌─────────────────────────────────────────────┐
│ CODE PUSHED TO MAIN │
└────────────────┬────────────────────────────┘
│
▼
┌───────────────┐
│ VALIDATE │ ← Check code quality
│ - HTML/JS │
│ - Products │
│ - Sizes │
└───────┬───────┘
│ ✅ Pass
▼
┌───────────────┐
│ BUILD │ ← Create production
│ - npm ci │
│ - Clean up │
│ - Build │
└───────┬───────┘
│ ✅ Pass
▼
┌───────────────┐
│ DEPLOY │ ← Publish to Pages
│ - Upload │
│ - Publish │
└───────┬───────┘
│ ✅ Pass
▼
┌───────────────┐
│ SMOKE TEST │ ← Verify live site
│ - Check URLs │
│ - Assets OK │
└───────────────┘
│
▼
🎉 SUCCESS!
The automated validation checks:
HTML Files:
- Valid DOCTYPE declaration
- Proper HTML structure
- Title tags present
- Viewport meta tags (mobile friendly)
JavaScript Files:
- No syntax errors
- Key functions present
- Not too many console.log statements
Product Data:
- PRODUCTS array exists
- formatPrice function exists
- renderProductsGrid function exists
Security:
- No Stripe secret keys
- No hardcoded passwords
- No API secrets
Build:
- Dependencies install
- Build completes successfully
- Critical files present
- Test files removed
- Always use PRs - Don't push directly to main
- Run local validation -
npm run validatebefore pushing - Monitor Actions - Watch workflow progress
- Fix failures quickly - Don't let broken builds sit
- Keep workflows updated - Review periodically
Track deployment success:
- Deployment frequency: Every push to
main - Average deployment time: 2-3 minutes
- Validation coverage: 6 quality gates
- Automated tests: 3 smoke tests post-deploy
/validate-deploy.js- Local validation script/package.json- NPM scripts/.deployignore- Files excluded from deployment/DEPLOYMENT_WORKFLOW.md- User guide
If workflows fail:
- Check Actions tab for detailed logs
- Run
npm run validatelocally - Review error messages
- Fix issues and push again
Last Updated: November 2, 2025 Workflows Version: 1.0 Maintained By: GitHub Actions