Skip to content
StaticScope
Overview
Get StaticScope

Publish to Netlify

Point Netlify at the repository StaticScope publishes to, with one branch per environment and no build step.

Publishing Updated 20 November 2026 5 min read

Netlify is happiest when it watches a repository and deploys a branch. StaticScope already produces exactly that: a branch of finished files with no build step. So the GitHub add-on does the publishing and Netlify does the serving.

You can also drag a ZIP into Netlify’s deploy area, and that is fine for a one-off. It stops being fine the second time, when you have to remember which files changed and which old files should go.

Connect the repository

  1. Publish once from StaticScope so the branch exists. See Publish to GitHub Pages for the token and environment fields; choose Netlify as the host so the setup steps match.
  2. In Netlify, select Add new project, then Import an existing project, then GitHub.
  3. Pick the repository and the branch for your live environment.
  4. Leave the build command empty and set the publish directory to /.
  5. Save and deploy.

Netlify’s GitHub App is the normal way in. It only needs read access, because Netlify never writes to the repository. If you cannot install the app on the repository’s owner, Netlify offers a deploy key instead: it generates a public key, you add it under the repository’s Settings → Deploy keys, and Netlify reads the branch from there. Nothing about that key is managed by StaticScope, and it does not need to be.

If your Netlify team makes new projects private by default, make this one public, or visitors get a login page instead of the site.

Build settings

There is nothing to build. The files on the branch are the site, at the top level, with index.html at the root. An empty build command and a publish directory of / is the whole configuration. If you leave an old framework preset or a build command in place, Netlify tries to run it, fails, and the deploy log is the only place that says so.

One branch per environment

Netlify calls the branch it serves the production branch. That should be the branch your live StaticScope environment publishes to. Every other branch is either ignored or deployed as a preview, depending on your settings.

For Staging, open Project configuration → Developer settings → Continuous deployment → Branches and deploy contexts, select Configure, choose Let me add individual branches, add the branch and save. Then publish to that environment from StaticScope. Netlify picks up the new commit and gives it its own preview address.

The GitHub add-on adds noindex, nofollow to every non-live branch and leaves robots.txt alone. That means a preview cannot turn up in search results, but a staging site is still reachable by anyone with the link. If that matters, put Netlify’s password protection or a Cloudflare Access rule in front of it.

Redirects and headers

Netlify reads _redirects and _headers from the publish directory. Both are on the add-on’s kept list, so a publish replaces the pages and leaves your rules in place. Edit them on the branch, or add them to the repository before the first publish, and they survive every deploy after that.

# _redirects
/old-page/  /new-page/  301

# _headers
/*
  X-Frame-Options: DENY
  Referrer-Policy: strict-origin-when-cross-origin

Keep redirects for URLs WordPress used to handle. A static site cannot resolve a slug that no longer exists, so a moved page needs a rule or it becomes a 404. StaticScope’s own redirect settings are covered in Redirects.

Caching

Each Netlify deploy is a new set of files behind its CDN, and the project’s own cache is tied to that deploy. Pages normally pick up the new version on the next request. Assets can sit in a cache for longer, so a stylesheet that keeps its file name can lag behind the HTML that references it.

The cache to watch is the one you put in front of Netlify. A Cloudflare proxy or a corporate CDN in front of the Netlify address will happily serve yesterday’s HTML. If you use one, purge it after a deploy, or set a short edge TTL for HTML and a long one for assets.

The deploy worked but the site is stale

Netlify saying “Published” means it deployed the commit it saw. It does not mean that commit was the one you expected. Work down this list:

  • Wrong branch. Open the deploy and read the commit hash. Compare it with the branch in StaticScope’s environment card, and with wp staticscope github status.
  • Wrong site. Two Netlify projects on the same repository is a common accident. Check the project’s repository and branch, not its name.
  • Wrong publish directory. If the directory points at a subfolder, the deploy succeeds and serves a 404 or a directory listing.
  • A cached copy in front. Purge the proxy, then hard-reload the page.
  • Old links, new files. Pages can be current while canonical tags and asset URLs point at the old domain. That is a build made for a different address: change the address in StaticScope, build again, publish again.
  • Deploys locked or ignored. Check the project’s deploy settings for a locked branch or an ignored build.

One more cause is often missed: the GitHub add-on replaces the branch, so if you hand-edited a file on GitHub, the next publish removes the edit. Put changes in WordPress, or in one of the kept files.

Forms

If you use the Forms add-on and choose Netlify Forms, the form is plain HTML with data-netlify and a hidden form-name, and Netlify finds it when it processes the deploy. Nothing works before the first deploy that contains the form, and a custom domain or branch preview needs the form in that deploy’s HTML too. See Forms on a static site.

Custom domain

  1. Add the domain in Netlify and follow its DNS instructions. HTTPS is provisioned for you.
  2. Change the address on the StaticScope environment to the new domain.
  3. Build again, then publish. The build carries absolute links, so this order matters.

Next