Deploy site via Netlify
Netlify is a first-class deploy target in SleekCMS. You connect your Netlify account once, select a site, and every deploy from the CMS pushes the freshly built output to that Netlify site. Domains, HTTPS, edge caching, and redirects come from Netlify's platform; SleekCMS handles the build and the push.
This page covers the setup, what happens on each deploy, working with custom domains, and a few notes on cache and redirects.
Setup
The connection has three steps:
- Authorize SleekCMS with Netlify. From the deploy section, follow the "Connect Netlify" flow. You'll be redirected to Netlify, sign in, and authorize SleekCMS to deploy on your behalf. The OAuth token is stored encrypted on your site.
- Pick a Netlify site. Choose an existing Netlify site to deploy to, or create a new one inline. The new-site flow asks for a site name (which becomes the default
*.netlify.appsubdomain) and creates the empty site in your Netlify account. - Deploy. From the SleekCMS deploy section, click Deploy. The CMS builds the static output and pushes it to the linked Netlify site.
After the initial setup, deploys are one click — no further configuration needed.
What Happens on Each Deploy
Each deploy from SleekCMS to Netlify follows this sequence:
- The site builder compiles the current state of your content and templates into static HTML, CSS, JS, and assets.
- SleekCMS packages the output and uploads it to Netlify via Netlify's deploy API.
- Netlify processes the upload — invalidating its edge cache and rolling out the new files.
- The deployed URL serves the new version within seconds.
You'll see the deploy status update in real time in the CMS. Netlify itself also logs the deploy in your Netlify dashboard, where you can review history, roll back to a previous deploy if needed, and see the deploy diff.
Custom Domains
Netlify handles custom domains. From your Netlify site dashboard:
- Add your custom domain (e.g.,
example.com). - Update your DNS to point to Netlify per Netlify's instructions (typically a CNAME or A record).
- Netlify provisions an HTTPS certificate automatically via Let's Encrypt.
SleekCMS doesn't need to know about the custom domain — Netlify routes the traffic and your deploys go to the same Netlify site regardless of which domain serves them.
If you want absolute URLs from your templates (canonical links, OG image URLs, RSS feeds) to use the custom domain, set the site origin in Site Configuration to the custom domain. The url() template helper uses that origin when constructing full URLs.
Redirects and Headers
Netlify supports _redirects and _headers files at the root of the deployed site for URL rewriting and HTTP header customization. To use them in SleekCMS, add them to public/:
public/
_redirects
_headers
These files are served as-is at the deployed site's root, and Netlify reads them on each deploy. Standard Netlify syntax works — see Netlify's documentation for the full rule format.
Common uses:
# public/_redirects
/old-blog/* /blog/:splat 301
/api/* https://api.example.com/:splat 200
# public/_headers
/*
X-Frame-Options: DENY
Referrer-Policy: no-referrer-when-downgrade
/fonts/*
Cache-Control: public, max-age=31536000, immutable
Triggering Deploys from Content Publish
If you'd rather deploy in response to a publish action (rather than clicking Deploy in the CMS), you have two paths:
- From the publish flow — When you publish content to an environment, you can select a publish trigger to fire alongside the publish. Configure a Netlify build-hook trigger so that publishing kicks off a Netlify build automatically.
- From the SleekCMS deploy — The CMS deploy button stays available. Many teams use both: editors publish content (no automatic deploy), and a developer or scheduled task triggers the final SleekCMS deploy.
For the trigger-based approach see Automating using Triggers.
Rollbacks
Netlify keeps the history of every deploy. From the Netlify dashboard:
- Open the site's "Deploys" tab.
- Find the previous deploy you want to restore.
- Click "Publish deploy".
Netlify makes that deploy current again. The next SleekCMS deploy overwrites it.
SleekCMS doesn't currently expose Netlify's rollback UI in its own interface — use the Netlify dashboard directly for rollbacks.
What's Next
- Deploying Sites — Overview of all deploy targets.
- Deploy site via surge.sh — Alternative target for quick deploys.
- Static Site Downloads — Manual ZIP export.
- Automating using Triggers — Triggering external builds and deploys on publish.
- Site Configuration — Setting the site origin for absolute URLs.