Automation
CI/CD
Every generated project can run its full quality gate with one command and already includes a GitHub Actions workflow for it. This page shows what you get, how to run the same checks elsewhere, and which CLI checks are worth adding.
One command for the quality gate
npm run ci runs the project's checks in order and stops at the first failure. fsd:check runs Steiger, which every template installs, so FSD layer and public-API rules are enforced from the first commit.
| Framework | npm run ci |
|---|---|
| React + Vite | fsd:check → lint → build |
| Next.js | check:template → fsd:check → lint → typecheck → build |
| Vue + Vite | fsd:check → lint → build |
| Nuxt | fsd:check → lint → typecheck → build |
| SvelteKit | fsd:check → lint → typecheck → build |
Included GitHub workflows
- CI: on pushes to main and on pull requests, installs with
npm ci, rejects whitespace errors, and runsnpm run ci. Every template except Next.js also audits production dependencies. - Dependency security and Dependabot keep dependencies patched.
- Vue, Nuxt, and SvelteKit include CodeQL. React and Vue add a commitlint check for pull requests, and React ships manually dispatched Auto-PR and labeler workflows.
Nothing publishes or deploys automatically. Review the workflows in .github/workflows and delete the ones you do not need.
Local Git hooks
Hooks stay light so commits stay fast: pre-commit checks whitespace, commit-msg enforces conventional commits, and heavier checks run in CI. Opt in to more locally, or bypass when needed:
FSD_PRE_COMMIT_LINT=1 git commit -m "feat: add catalog"
FSD_PRE_PUSH_CHECKS=1 git push
HUSKY=0 git commit -m "docs: update guide" # skip hooks onceAdd CLI checks
Two CLI commands are useful in a pipeline. Both are read-only.
- name: FSD architecture
run: npx create-fsd-architecture@latest check --architecture
- name: CLI upgrade status
run: |
set +e
npx create-fsd-architecture@latest upgrade --check
code=$?
# 0 current, 2 upgrade available, 3 blocked by conflicts, 4 invalid
if [ "$code" -eq 2 ]; then echo "::warning::A CLI upgrade is available"; exit 0; fi
exit $codeThe snippet treats an available upgrade as a warning and fails only on conflicts or an invalid project. See safe upgrades for what each state means.
Other CI providers
The gate is plain npm scripts, so any runner with Node.js 22 works. GitLab CI example:
# .gitlab-ci.yml
quality:
image: node:22
cache:
paths: [.npm/]
script:
- npm ci --cache .npm --prefer-offline
- npm run ci
- npx create-fsd-architecture@latest check --architectureWith another package manager, install with its frozen-lockfile mode: pnpm install --frozen-lockfile, yarn install --immutable, or bun install --frozen-lockfile, then pnpm run ci, yarn ci, or bun run ci.
Deploying
Deployment depends on the framework's output (static files or a Node.js server). Connect the repository to your host and use npm run build as the build command.