Example repository: a SvelteKit front-end with pnpm, CI and an image
  • TypeScript 44.5%
  • Dockerfile 31.5%
  • HTML 12.8%
  • Svelte 11.2%
Find a file
Sander van Thillo a6be5f5a4a
All checks were successful
CI / test (push) Successful in 18s
CI / audit (push) Successful in 18s
CI / lint (push) Successful in 22s
CI / image (push) Successful in 49s
feat: example repository for svelte with CI
2026-11-13 21:29:50 +01:00
.forgejo feat: example repository for svelte with CI 2026-11-13 21:29:50 +01:00
src feat: example repository for svelte with CI 2026-11-13 21:29:50 +01:00
static feat: example repository for svelte with CI 2026-11-13 21:29:50 +01:00
.dockerignore feat: example repository for svelte with CI 2026-11-13 21:29:50 +01:00
.editorconfig feat: example repository for svelte with CI 2026-11-13 21:29:50 +01:00
.gitignore feat: example repository for svelte with CI 2026-11-13 21:29:50 +01:00
.prettierignore feat: example repository for svelte with CI 2026-11-13 21:29:50 +01:00
.prettierrc feat: example repository for svelte with CI 2026-11-13 21:29:50 +01:00
Dockerfile feat: example repository for svelte with CI 2026-11-13 21:29:50 +01:00
nginx-default.conf feat: example repository for svelte with CI 2026-11-13 21:29:50 +01:00
package.json feat: example repository for svelte with CI 2026-11-13 21:29:50 +01:00
pnpm-lock.yaml feat: example repository for svelte with CI 2026-11-13 21:29:50 +01:00
README.md feat: example repository for svelte with CI 2026-11-13 21:29:50 +01:00
renovate.json feat: example repository for svelte with CI 2026-11-13 21:29:50 +01:00
tsconfig.json feat: example repository for svelte with CI 2026-11-13 21:29:50 +01:00
vite.config.ts feat: example repository for svelte with CI 2026-11-13 21:29:50 +01:00

$REPO_OWNER/$REPO_NAME

A static front-end with SvelteKit and pnpm. nginx serves the prerendered pages.

Start

You need Node.js 24 and corepack.

corepack pnpm install
corepack pnpm dev           # http://localhost:5173
Command What it does
pnpm lint Prettier check
pnpm check Type check with svelte-check
pnpm test Unit tests with Vitest
pnpm build The static site in build/
pnpm format Format all files

Pipeline

.forgejo/workflows/ci.yml is the complete pipeline. Copy it and change it as you need.

Event What happens
Pull request Lint, type check, tests and pnpm audit in parallel, then the image is built without a push
Push to main The same, and the image is pushed as <short sha>-main-<run number>
Tag vX.Y.Z Also the image X.Y.Z

The checks run on the label default, without root. The image build needs Docker, so it runs on the label vm. The image is code.digitaledienst.overheid.nl/$REPO_OWNER/$REPO_NAME and has an SBOM. It runs nginx as uid 101 on port 8080. The push uses the organisation secrets REGISTRY_USER and REGISTRY_TOKEN.

Files

File Purpose
Dockerfile Build with pnpm, serve with nginx-unprivileged
nginx-default.conf Serves /page from page.html, and gives a real 404
renovate.json The shared Renovate presets, and the tags of the actions of forgejo/ci-components
.forgejo/template The files in which Forgejo fills in the name of a new repository