Skip to content

Deploy

SwiftAgency builds to plain static files in dist/. Any host that serves HTML works; the theme ships ready-made configuration for the three most common ones.

  1. Set url in src/config/site.ts to your domain. Canonical URLs, the sitemap, hreflang links and social cards are built from it.

  2. Change the Sitemap: line in public/robots.txt to the same domain.

  3. Run npm run verify locally. If it passes, the build will pass on your host too.

  4. Push the project to your own GitHub, GitLab or Bitbucket repository.

Import the repository in Netlify. netlify.toml sets everything:

  • build command npm run build, publish directory dist
  • Node 22, and KEYSTATIC=false so the CMS never loads during a build
  • pretty URLs, so /work is served from work.html

Cache and security headers come from public/_headers.

The theme’s README has “Deploy to Netlify”, “Deploy with Vercel” and “Deploy to Cloudflare” buttons. They copy a repository into your account and deploy it in one go. They point at the theme’s own repository, so once your project lives in your repository, replace ilesscodex/SwiftAgency in the button links with yours.

All three hosts issue certificates automatically once you add a domain in their dashboard. Update url in site.ts to the final domain and redeploy, otherwise canonical links keep pointing at the old address.

.github/workflows/ci.yml runs on every push and pull request:

  1. npm ci and npm run verify: Astro Check, ESLint, Prettier and a full build.
  2. Lighthouse CI on seven key pages, three runs each. The job fails if Accessibility, Best Practices or SEO drop below 100, or desktop Performance below 95.

Hosts build on their own, so CI is a safety net rather than a deploy step. See Performance.

SwiftAgency is made byLessCodexLicence