Configures GitHub Actions workflows and CI/CD pipelines. Manages automated releases via Changesets, PR validation, and Husky hooks. Troubleshoots CI failures...
Guide the configuration and management of GitHub Actions workflows, release automation, and CI/CD pipelines for the Saleor Configurator project.
| Workflow | Trigger | Purpose |
|---|---|---|
test-on-pr.yml |
PR to main | Typecheck, lint, test, build |
release.yml |
Push to main | Changesets publish to npm |
changeset-bot.yml |
PR opened/synced | Comment on missing changesets |
.github/
āāā workflows/
ā āāā test-on-pr.yml # PR validation
ā āāā release.yml # Automated releases
ā āāā changeset-bot.yml # Changeset automation
.husky/
āāā pre-push # Schema docs generation
.changeset/
āāā config.json # Changeset configuration
āāā *.md # Pending changesets
Validates PRs before merge. Runs: typecheck, lint, test, build. Uses pnpm 9 + Node 20.
See references/workflow-templates.md for full YAML.
| Check | Command | Purpose |
|---|---|---|
| Type check | pnpm typecheck |
TypeScript validation |
| Lint | pnpm lint |
Biome linting |
| Test | pnpm test |
Vitest test suite |
| Build | pnpm build |
Compilation check |
Automated npm releases via Changesets. Triggers on push to main with concurrency control.
Uses changesets/action@v1 with pnpm publish:ci-prod. Requires GITHUB_TOKEN and NPM_TOKEN.
1. Developer creates changeset -> pnpm changeset
2. PR merged to main
3. Changesets action runs:
a. If changesets exist -> Creates "Version Packages" PR
b. If version PR merged -> Publishes to npm
Comments on PRs about missing changesets. Uses changesets/bot@v1.
Located in .husky/pre-push:
pnpm generate-schema-docs before every pushLocated in .changeset/config.json. Key settings: access: "public", baseBranch: "main".
| Type | When to Use |
|---|---|
patch |
Bug fixes, documentation, refactoring |
minor |
New features, non-breaking enhancements |
major |
Breaking changes, API modifications |
Use gh for workflow management: gh run list, gh run view <id>, gh run watch <id>, gh run rerun <id>, gh pr checks <number>.
| Failure | Command |
|---|---|
| Type check | pnpm typecheck or npx tsc --noEmit |
| Lint | pnpm lint then pnpm check:fix |
| Tests | pnpm test -- --filter=<file> |
| Build | pnpm build |
gh run rerun <run-id>If npm publish fails: wait and retry. Check status at https://status.npmjs.org/
| Secret | Purpose | Where Set |
|---|---|---|
GITHUB_TOKEN |
Auto-provided | GitHub |
NPM_TOKEN |
npm publishing | Repository Settings > Secrets > Actions |
| Mistake | Fix |
|---|---|
Missing --frozen-lockfile |
Always use in CI installs |
Using @latest action versions |
Pin to specific versions (@v4) |
No concurrency setting |
Add to prevent duplicate runs |
| Forgetting to add changeset | Run pnpm changeset before PR |
.github/workflows/ - Workflow files.husky/ - Git hooks.changeset/ - Changeset configurationcreating-changesets for changeset creationvalidating-pre-commit for reproducing CI checks locally