# Deployment

## Deployment & Launch

Consultiz builds a static site into `dist/`, so it runs on any static host. It ships settings files for **Netlify** (`netlify.toml`), **Vercel** (`vercel.json`, `vercel.sh`), and **Cloudflare Pages** (`wrangler.toml`).

| Setting          | Value                     |
| ---------------- | ------------------------- |
| Build command    | `npm run build`           |
| Output directory | `dist`                    |
| Node.js version  | 22.12.0 or later          |
| Package manager  | npm (`package-lock.json`) |

### Before You Launch
`PUBLIC-VALUES-NEEDED.md` in the theme lists the values the demo can't know: your domain, contact details, social and review profiles, and award claims. Go through it, then through this list. Each item links to the page that explains it.

- [ ] `[site] baseUrl` is your real address, and `npm run build` shows no `[site]` warning ([SEO & AI Visibility](/consultiz/customization/seo-ai-visibility/))
- [ ] Site name, logos, favicon, social image, and colors are yours ([Quick Start](/consultiz/getting-started/quick-start/))
- [ ] Every demo phone number, email, address, and the office list are replaced ([Common Changes](/consultiz/customization/common-changes/#replace-all-demo-contact-details))
- [ ] The contact forms, the footer newsletter, and the newsletter section post to your own accounts, and the "not connected yet" notes are updated ([Forms](/consultiz/customization/forms/))
- [ ] Social links in `src/config/social.json` are yours and enabled; the demo links in `footer-awards.md` are replaced
- [ ] Client logos, ratings, review counts, awards, statistics, and testimonials are real, or removed. Ratings use your real platform's logo and link your profile there ([Sections](/consultiz/customization/sections/#client-logos-and-rating-badges))
- [ ] The **Home** and **Who we are** demo menus are trimmed to the pages you keep ([Menus](/consultiz/customization/menus/))
- [ ] Demo pages you don't need are deleted or set to `draft: true`, for example the one-page homepages, unused solution and industry layouts, and `/components/` ([Pages](/consultiz/customization/pages/))
- [ ] Demo content is replaced: solutions, people, careers, portfolio, case studies, industries, blog posts, and the webinar page. Only real, open positions are listed ([Collections](/consultiz/customization/collections/))
- [ ] The privacy policy and terms are reviewed for your business
- [ ] Analytics scripts are in `[head]`, gated on consent if the cookie banner is on ([Cookies & Analytics](/consultiz/customization/cookies-analytics/))
- [ ] The copyright line in `src/i18n/en.json` and `fr.json` has your name and the current year
- [ ] `npm run astro-check` and `npm run build` finish without errors, and you have looked at every page you changed

### Deploy
<Tabs>
  <TabItem label="Netlify">

    <Steps>

    1. Push your project to GitHub, GitLab, or Bitbucket.
    2. In Netlify, choose **Add new site → Import an existing project** and pick the repository.
    3. Netlify reads `netlify.toml`: build command `npm run build`, publish folder `dist`, Node.js 22. Click **Deploy**.

    </Steps>

    The build uses `baseUrl` from `config.toml` unless you add a `SITE_URL` environment variable in the Netlify site settings.

    `netlify.toml` also sets long-term caching for `/_astro/*` and `/images/*`, and sends missing `/fr/...` URLs to the French 404 page. Add a block for each extra language.

    Using Netlify Forms? Set `contactFormProvider = "netlify"` and `contactFormAction = "/"`, enable form detection under **Forms**, and redeploy.

  </TabItem>
  <TabItem label="Vercel">

    <Steps>

    1. Push your project to GitHub, GitLab, or Bitbucket.
    2. In Vercel, choose **Add New → Project** and import the repository. Framework preset: **Astro**.
    3. Vercel reads `vercel.json`, which builds with `sh vercel.sh`. Click **Deploy**.

    </Steps>

    `vercel.sh` sets the site address (`SITE_URL`) for each build, and on Vercel it replaces `baseUrl`:

    - Production builds use the `SITE_URL` environment variable if you set one in the Vercel project settings. Otherwise they use your Vercel production domain. Set `SITE_URL` (for example `https://www.example.com`) when you want one exact address, such as the `www` or the bare domain.
    - Preview builds use `https://staging.<your production domain>`.

    Edit `vercel.sh` if you want something else.

    `vercel.json` also enables trailing slashes and redirects `/sitemap.xml` to `/sitemap-index.xml`.

  </TabItem>
  <TabItem label="Cloudflare Pages">

    **From git:** in the Cloudflare dashboard, open **Workers & Pages → Create → Pages → Connect to Git**, pick the repository, and set the build command to `npm run build` and the output directory to `dist` (the same folder as `pages_build_output_dir` in `wrangler.toml`).

    The included `wrangler.toml` already sets `NODE_VERSION = "22.13.1"` under `[vars]`. Cloudflare treats this file as the source of truth for the settings in it, so change them in the file. Set your address with `baseUrl` in `config.toml`.

    **From your computer:** Consultiz doesn't install Wrangler (Cloudflare's command-line tool) for you. Add it once, change `name` in `wrangler.toml` to your project name, then log in, build, and deploy:

    ```bash
    npm install -D wrangler
    npx wrangler login
    npm run build
    npm run deploy:cf
    ```

  </TabItem>
  <TabItem label="Other hosts">

    Run `npm run build` and upload the **contents** of `dist/` to your web server or static host.

    For Apache servers, `public/.htaccess` (copied into `dist/`) sets browser caching for CSS, JavaScript, images, and fonts.

  </TabItem>
</Tabs>

<Aside type="note">
  When a host builds from your repository, commit `package-lock.json` and keep
  `dist/`, `.astro/`, and `node_modules/` out of git (the included `.gitignore`
  already does). The theme also includes a GitHub Actions workflow,
  `.github/workflows/verify.yml`, that runs `npm run verify` on every push to
  `main` and on pull requests. Delete it if you don't use GitHub.
</Aside>

### After You Launch
<Steps>

1. Open the live site and click through the main pages, on a phone and a desktop, in English and French.
2. Send a test message through each contact form, and sign up for each newsletter once.
3. Open `https://your-domain/sitemap-index.xml` and `https://your-domain/robots.txt` to check that they use your domain.
4. Submit the sitemap in [Google Search Console](https://search.google.com/search-console) and [Bing Webmaster Tools](https://www.bing.com/webmasters).
5. Share a link in a chat app to check the preview image.

</Steps>

### Updating The Live Site
With a git-connected host, every push to your main branch deploys automatically. Build locally first (`npm run build`) to catch errors before they reach your visitors. See [Updating The Theme](/consultiz/beginner/updating-the-theme/) for new Consultiz versions.