---
title: Deployments
description: Deploy Sveltia CMS with CI/CD automation and control automatic deployment settings.
---

Sveltia CMS is a headless CMS, so it doesn’t involve any specific deployment process. The [two required CMS files](/docs/start#manual-installation), `index.html` and `config.yml`, can be hosted on any web server or static hosting service. This enables the project to be deployed like any other website using any preferred hosting service or platform.

## CI/CD Integration [#ci-cd-integration]

In most cases, you may want to automatically deploy your website whenever content is saved in your Git repository via Sveltia CMS. This can be achieved by integrating with a [CI/CD](https://en.wikipedia.org/wiki/CI/CD) (Continuous Integration/Continuous Deployment) service that monitors your Git repository for changes and triggers a build and deployment process.

All the supported Git backends offer their own CI/CD solutions or can be easily integrated with popular third-party CI/CD services. Here are some examples:

- Building: [GitHub Actions](https://github.com/features/actions), [GitLab CI/CD](https://docs.gitlab.com/ci/), [Gitea Actions](https://docs.gitea.com/usage/actions/overview), [Forgejo Actions](https://forgejo.org/docs/latest/user/actions/reference/), [Cloudflare Pages](https://pages.cloudflare.com/), [Netlify](https://www.netlify.com/), [Vercel](https://vercel.com/), [CircleCI](https://circleci.com/), [Travis CI](https://www.travis-ci.com/), [Jenkins](https://www.jenkins.io/), etc.
- Hosting: [GitHub Pages](https://docs.github.com/en/pages), [GitLab Pages](https://docs.gitlab.com/user/project/pages/), [Cloudflare Pages](https://pages.cloudflare.com/), [Netlify](https://www.netlify.com/), [Vercel](https://vercel.com/), [Amazon EC2](https://aws.amazon.com/ec2/), [Firebase Hosting](https://firebase.google.com/products/hosting), [DigitalOcean Droplets](https://www.digitalocean.com/products/droplets), etc.

Your choice of CI/CD service may depend on factors such as ease of use, pricing, performance and integration with your existing workflow. Some services only host completely static sites, while others can handle dynamic applications as well. Refer to the documentation of your chosen CI/CD and hosting providers for specific instructions on how to set up the deployment process.

## Deploy Previews

A connected CI/CD provider does more than publish your site: it reports each build back to your Git repository, and Sveltia CMS reads those reports. Editors get a link straight to the page they just worked on and can see whether the build carrying their change has finished.

This works in both production workflows. With [Editorial Workflow](/docs/workflows/editorial), an unpublished entry links to the preview built for its pull request, so a draft can be reviewed before it goes live. With [Simple Workflow](/docs/workflows/simple), the entry links to the live site and the CMS reports whether the latest build is done.

Nothing needs to be turned on. Set a [`preview_path`](/docs/collections/entries/previews#preview-paths) on the collections you want entry links for. Without it, only the root of a deploy preview is linked.

See [Deploy Previews](/docs/deployments/previews) for which providers are recognized and how the links behave while a build is running.

## Disabling Automatic Deployments

You may already have a CI/CD tool set up on your Git repository to automatically deploy changes to production. Sometimes you make so many content changes that you quickly reach your CI/CD provider’s (free) build limits. Or you may just not want a build triggered for every small change.

With Sveltia CMS, you can disable automatic deployments by default and manually trigger deployments at your convenience. This is done by adding the `[skip ci]` prefix to commit messages. This convention is supported by [GitHub Actions](https://docs.github.com/en/actions/managing-workflow-runs/skipping-workflow-runs), [GitLab CI/CD](https://docs.gitlab.com/ee/ci/pipelines/#skip-a-pipeline), [CircleCI](https://circleci.com/docs/skip-build/#skip-jobs), [Travis CI](https://docs.travis-ci.com/user/customizing-the-build/#skipping-a-build), [Netlify](https://docs.netlify.com/site-deploys/manage-deploys/#skip-a-deploy), [Cloudflare Pages](https://developers.cloudflare.com/pages/platform/branch-build-controls/#skip-builds) and others.

:::info[No build, no preview]

A skipped commit produces no build, so there’s nothing for [Deploy Previews](/docs/deployments/previews) to report and the entry keeps its plain live-site link. This applies to Editorial Workflow saves too, where the prefix is added to the pull request’s commits. Deletion commits are never skipped.

:::

### Configuration

Here are the steps to use this feature:

1. Add the `skip_ci` property to your `backend` configuration with a value of `true`:

   ```yaml YAML {5}
   backend:
     name: github
     repo: owner/repo
     branch: main
     skip_ci: true
   ```

   ```toml TOML {5}
   [backend]
   name = "github"
   repo = "owner/repo"
   branch = "main"
   skip_ci = true
   ```

   ```json JSON {6}
   {
     "backend": {
       "name": "github",
       "repo": "owner/repo",
       "branch": "main",
       "skip_ci": true
     }
   }
   ```

   ```js JavaScript {6}
   {
     backend: {
       name: "github",
       repo: "owner/repo",
       branch: "main",
       skip_ci: true,
     },
   }
   ```

1. Commit and deploy the change to the config file and reload the CMS.
1. Now, whenever an entry or asset is saved, `[skip ci]` is automatically added to each commit message. However, deletions are always committed without the prefix, so that deleted data doesn’t unexpectedly stay on the site.
1. To deploy a new or updated entry, along with any other unpublished entries and assets, click the arrow next to the Save button in the Content Editor, then select **Save and Publish**. This omits `[skip ci]` and so triggers CI/CD.

If you set `skip_ci` to `false`, the behavior is reversed. CI/CD is triggered by default, and a **Save without Publishing** option adds `[skip ci]` to that one commit only.

:::warning[Deprecation Notice]

The `automatic_deployments` option has been deprecated in favor of the more intuitive `skip_ci` option. It will be removed in Sveltia CMS v1.0.0.

If you are upgrading from an older version, update your configuration:

- `automatic_deployments: false` is equivalent to `skip_ci: true`.
- `automatic_deployments: true` is equivalent to `skip_ci: false`.

:::

:::tip[Unpublished vs. Drafts]

Unpublished entries and assets are not drafts. Once committed to your repository, those changes can be deployed any time another commit is pushed without `[skip ci]`, or when a manual deployment is triggered.

:::

### Manual Deployment Trigger

If the `skip_ci` property is defined, you can manually trigger a deployment by clicking the **Publish Changes** button on the application header. To use this feature:

#### GitHub Actions

Without any configuration, Publish Changes will [trigger a `repository_dispatch` event](https://docs.github.com/en/rest/repos/repos#create-a-repository-dispatch-event) with the `sveltia-cms-publish` event type. Update your build workflow to receive this event:

```yaml
on:
  push:
    branches: [$default-branch]
  repository_dispatch:
    types: [sveltia-cms-publish]
```

#### GitLab CI/CD [#gitlab-ci-cd]

Without any configuration, Publish Changes will [create a new pipeline](https://docs.gitlab.com/api/pipelines/#create-a-new-pipeline) on the configured branch with the signed-in user’s access token. A pipeline created this way runs even when the latest commit has the `[skip ci]` prefix, so there’s no deploy hook URL to set up.

The user needs the Developer role or higher on the project, and if the branch is [protected](https://docs.gitlab.com/user/project/repository/branches/protected/), permission to push or merge to it.

The pipeline has `api` as its [`CI_PIPELINE_SOURCE`](https://docs.gitlab.com/ci/jobs/job_rules/#ci_pipeline_source-predefined-variable). If your `.gitlab-ci.yml` only runs on push, GitLab refuses to create the pipeline and the CMS shows an error. Allow the `api` source as well:

```yaml
workflow:
  rules:
    - if: $CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "api"
```

#### Other CI/CD Providers [#other-ci-cd-providers]

To use Publish Changes with a CI/CD provider other than GitHub Actions or GitLab CI/CD, you need to set up a [webhook](https://en.wikipedia.org/wiki/Webhook) in your CI/CD provider that triggers a build when called. Check your provider’s documentation for instructions on how to create a deploy hook URL. Here are some examples:

- [Cloudflare Pages](https://developers.cloudflare.com/pages/configuration/deploy-hooks/)
- [Netlify](https://docs.netlify.com/build/configure-builds/build-hooks/)
- [Vercel](https://vercel.com/docs/deploy-hooks)

Then, configure Sveltia CMS to use this URL:

1. Select Settings under the Account button in the top right corner of the CMS.
1. Select the Developer tab.
1. Enter the deploy hook URL for your provider.
1. [Configure the CSP](/docs/security#setting-up-content-security-policy) if necessary.

:::info[Why Deploy Hook URL Is Stored in User Settings]

Deploy hook URLs are confidential, so they can’t be stored in the CMS configuration file, which is usually readable on a public website. Sveltia CMS works entirely in the frontend, so it has no other secure place to store such credentials. That’s why they are managed in the user settings, which are stored securely in the browser’s local storage.

When the user signs out, the deploy hook URL and its authorization header are removed from the browser, along with the API keys for other integrations. They need to be entered again after signing back in.

With [Sveltia CMS Additions](/docs/additions), an admin can instead [share the deploy hook](/docs/additions/administration#credentials) with everyone who signs in, so nobody has to enter it.

:::
