Home/ Documentation/ Panels & Tools/ Publish your website

Publish your website

Publish a Pinegrow project to GitHub, Netlify, Cloudflare Pages or an SFTP server. Review what will be uploaded, removed and excluded before anything is sent, and send only changed files on later publishes.

Requires Pinegrow 10

Publish your project straight from Pinegrow to GitHub, Netlify, Cloudflare Pages or your own server over SFTP. Before anything is sent, Pinegrow shows a review of the files it will upload, the remote files it may remove and the files it leaves out. After the first publish, later publishes send only what changed.

Pinegrow Desktop publishes to all four destinations. Pinegrow Online publishes to GitHub, Netlify and Cloudflare Pages; SFTP publishing is available only in Pinegrow Desktop.

Open Publish

Open a project and click Publish in the top bar. You can also click the project name in the Project panel and choose Publish….

The Publish Project workspace opens over the editor:

  • Publish targets on the left lists the destinations configured for this project. Click Add target to add one.
  • The middle panel shows the selected target, the Create preview deployment and Review & publish buttons, and the progress and result of the current publish.
  • History on the right lists the deployments the provider reports for the selected target. Click Open on an entry to open that deployment in your browser, or Refresh to reload the list.
Pinegrow Publish Project workspace. The Publish targets list on the left contains one Netlify target, mira-bay-piran.netlify.app. The middle panel shows the site card with its https://mira-bay-piran.netlify.app address and Site admin link, the Create preview deployment and Review & publish buttons, and a result box saying The site is published! with Visit the published site, Copy URL and Site admin buttons. The History panel on the right lists three deployments, two production and one deploy-preview, each with an Open button.
The Publish workspace: publish targets on the left, the selected target with its actions and result in the middle, and the provider's deployment history on the right.

Click Close to return to the editor. Targets are saved with the project.

Add a publish target

  1. In Publish, click Add target and choose a provider.
  2. If this is the first time you use the provider, Pinegrow asks you to connect your account. Each provider's steps are described below.
  3. Choose or create the destination: a Netlify site, a Cloudflare Pages project, a GitHub repository or a folder on your SFTP server.
The Add target button in the Publish targets panel with its menu open, listing Pinegrow Online..., Netlify..., Cloudflare Pages..., GitHub repo... and SFTP....
Add target lists the providers you can publish to.

Click … next to a target to change it with Edit target… or Change target…, to open the provider's Account settings…, or to remove it from the project with Forget target….

Review and publish

Click Review & publish. Pinegrow saves your open pages, collects the project files and prepares a plan. Nothing is sent to the destination yet.

The review shows:

  • Files in deploy: how many files are published and their total size.
  • Files to upload: the files that will be sent. Netlify decides this itself during the deploy.
  • Remote deletions: files at the destination that will be removed, when Pinegrow can check them.
  • Excluded: files that are never published.
  • Notes at the top about how the provider replaces files and what Pinegrow could not verify.

Click the arrow next to a count to see its files.

The Review publish to mira-bay-piran.netlify.app dialog. A notice says This replaces the live deployment. Files not included in this publish will no longer be available. A table lists Provider Netlify, Files in deploy 12 file(s), 3 MB, Files to upload Provider will determine changed files during deploy, Remote deletions 0 file(s), and Excluded 1 path(s), expanded to show pinegrow.json. The buttons are Cancel and Publish to production.
The review shows what the publish will contain before anything is sent. Expand a row to see its files.

Click Publish to production (for GitHub, Commit to repository) to go ahead, or Cancel to close the review without publishing. Progress runs through the stages Prepare, Review, Upload, Commit and Verify. You can click Cancel publishing while it runs.

When the publish finishes you see The site is published! with buttons to visit the site, Copy URL and, where the provider has one, Site admin. Click See details for the full log.

Publish only what changed

After the first publish, Pinegrow compares the project with what is already at the destination and sends only new and changed files. Netlify and Cloudflare Pages check file fingerprints and skip files they already have. GitHub commits only changed files. SFTP uses a record of the last publish that Pinegrow keeps on the server.

The Review publish to dialog for the Cloudflare Pages project mira-bay-piran (account name hidden). Notices say Cloudflare creates a complete deployment snapshot, and removal counts are estimates from the last local deployment record. The table shows Provider Cloudflare Pages, Files in deploy 12 file(s), 3.1 MB, Files to upload 1 file(s) expanded to index.html, Remote deletions Estimated: 0 file(s), and Excluded 1 path(s). Buttons: Cancel and Publish to production.
After the first publish, the review lists only the files that changed.

Exclude files

Pinegrow never publishes its own project files: pinegrow.json, project.pgml, projectdb.pgml and the _pgbackup, _pgexport and _pginfo folders.

To leave out more, click Exclude… at the top of Publish. Enter one file or folder per line, relative to the project folder, or use Add file and Add folder to pick them. Wildcards are not supported. Click Save. Exclusions apply to every target of the project except Pinegrow Online.

On Netlify, Cloudflare Pages and GitHub, a file that was published before and is now excluded is removed from the destination.

Preview a change

Netlify and Cloudflare Pages targets also have Create preview deployment. It publishes a complete copy of the project to a separate preview address and leaves the live site unchanged. Check the preview, then use Review & publish to take the change live.

Compare with what you published

In Pinegrow Desktop, each successful publish (previews excluded) also saves a revision of the project, marked as published. Open the Revisions tab of Pinegrow's History panel and click Compare with published to see what changed in the project since the last publish. See Visual change review and revisions.

Accounts and credentials

In Pinegrow Desktop, tokens, sign-ins, passwords and private keys are stored in your computer's secure credential storage when it is available. The account settings dialog tells you where the credential is kept. Pinegrow never sends it to the Pinegrow server. Publish targets themselves are saved in the project, without the credentials. See Pinegrow Data folder and protected credentials.

Netlify

Connect your Netlify account

  1. Choose Add target › Netlify….
  2. In Netlify settings, click Go to the Netlify admin and create a personal access token. If you don't have an account yet, click Create a free Netlify account.
  3. Paste the token into Access token and click Save.

Pinegrow does not display the token again. Keep a copy in your password manager if you need it on another computer. Forget saved token in the same dialog removes the token from Pinegrow, but does not revoke it in Netlify.

Choose or create a site

The Target list shows the sites in your Netlify account. Choose one and click Continue, or choose Configure new target… to create a site. In Create a new site on Netlify, enter a Site name and click Create. The name must be unique across all of Netlify and becomes the address [site name].netlify.app. Leave the name empty and Netlify picks one for you.

The Create a new site on Netlify dialog. It says The site name must be unique across all Netlify sites. The site domain name will be [site name].netlify.app. The Site name field contains mira-bay-piran, with Cancel and Create buttons below.
Name the new site, or leave the name empty and Netlify picks one.

Publish or preview

Review & publish replaces the live deployment: files that are not part of the publish are no longer available on the site. Create preview deployment creates a complete preview snapshot at its own address and does not replace the live site.

The Publish workspace after Create preview deployment. The result box says The preview is ready! The project is not yet published on the main site. Use Publish to deploy it to the main site. Buttons: Visit the preview site, Copy URL and Site admin. A Deployment URL copied to clipboard message is shown. The History panel lists a deploy-preview entry above the earlier production entry.
A preview deployment gets its own address. The live site is not changed until you publish to production.

To go back to an earlier version, click Site admin… on the target card to open the site in Netlify, and publish an earlier deploy from its deploy list. Set up a custom domain in Netlify, too.

Netlify server functions are not uploaded; Pinegrow publishes static files.

Cloudflare Pages

Connect your Cloudflare account

  1. Choose Add target › Cloudflare Pages….
  2. In Connect Cloudflare, click Authorize Cloudflare. Cloudflare opens in your browser.
  3. Choose the Cloudflare account or accounts Pinegrow may use and approve access to Pages. Pinegrow stores the authorization on your computer.

To disconnect or reconnect later, open the target's Account settings… and click Disconnect or Reconnect.

Choose or create a Pages project

The Target list shows the Pages projects in the accounts you granted. Choose one, or choose Create Direct Upload project…. Pick the Cloudflare account, enter a Project name and click Create. The project's address ends in pages.dev.

The Create Cloudflare Pages project dialog. It says This creates a Direct Upload project in your Cloudflare account. It does not use a Git repository, and notes that a Direct Upload project can not later be converted to Cloudflare's Git integration. Fields: Cloudflare account (account name hidden) and Project name with the placeholder my-site. Buttons: Cancel and Create.
Pinegrow creates a Direct Upload Pages project in the Cloudflare account you choose.

A Direct Upload project receives files straight from Pinegrow, with no Git repository or build step. If you choose an existing project that is connected to Git, Pinegrow publishes directly, outside that Git build.

Each production publish creates a complete deployment: files left out of the publish are not in the new deployment. Create preview deployment publishes a preview that does not replace production.

Cloudflare Pages Functions (a functions folder, _worker.js or _routes.json) are not supported. Exclude them or deploy that project with Cloudflare's own tools. Each file can be at most 25 MiB.

GitHub

A GitHub target commits your project files to a branch of a repository.

Connect GitHub

  1. Choose Add target › GitHub repo….
  2. Connect GitHub shows a code and opens GitHub in your browser. Enter the code there (Copy code copies it, Open GitHub opens the page again) and authorize Pinegrow.
  3. Install the Pinegrow Connect GitHub App for the repositories you want to publish to. The app installation on GitHub controls which repositories Pinegrow can access.

Configure the repository

In Configure GitHub repository target, set:

  • Owner and Repository. The list shows repositories that Pinegrow Connect can access and you can write to. Use New GitHub repo to create one on GitHub, and App access to give Pinegrow Connect access to it, then reopen the dialog.
  • Branch that Pinegrow commits to. The default is main.
  • Publish path, an optional folder in the repository. Leave it empty to publish to the repository root.
  • Commit message for the commits Pinegrow creates. The default is Publish from Pinegrow.

Files under the publish path that are not in the project, or that are excluded, are deleted from the branch. Review the Remote deletions list before you click Commit to repository.

GitHub Pages

To serve the site with GitHub Pages, turn on Pages for the repository on GitHub and choose the same branch. Pinegrow then waits for the Pages build after each commit and offers Open GitHub Pages site. If Pages is set to a different folder than the target's publish path, the result tells you. Pages can take a short time to build after the branch is updated.

SFTP

Publish to your own web server over SFTP. SFTP is available in Pinegrow Desktop.

Configure the server

Choose Add target › SFTP… and fill in Configure SFTP target:

  • Host, Port (usually 22) and Username.
  • Remote path: the folder the site is uploaded to, relative to the login folder, or starting with / for an absolute path. If you choose the server root, Pinegrow asks you to confirm, because publishing there can overwrite or delete files outside the site folder.
  • Site URL (optional): the public address, used to open the site after publishing.
  • Authentication: Password, Private key (paste the key) or Private key file, with an optional Passphrase.
  • Delete removed files: when on, Pinegrow deletes files it published earlier that no longer exist in the project or are now excluded.

Verify the server fingerprint

The first time Pinegrow connects, it shows Trust SFTP host key? with the server address and its SHA-256 fingerprint. Check the fingerprint with your server administrator or hosting provider, then click Trust host key. Pinegrow sends your credentials only after you trust the key.

Pinegrow saves the trusted key with the target. If the server presents a different key later, Pinegrow stops before signing in. If the key was changed on purpose, open Edit target…, click Reset trusted host key, save, and verify the new fingerprint on the next connection.

How SFTP publishing works

The first publish uploads every file and creates .pinegrow-publish-manifest.json in the remote folder. Files that were already on the server are kept. Later publishes use this manifest to upload only changed files and, if enabled, delete removed ones.

SFTP replaces files one by one, so visitors may see a mix of old and new files until publishing finishes. If a publish is interrupted, the next review offers a repair that uploads every included file. To start one yourself, use Advanced / repair › Review full upload.

Pinegrow Online

Add target › Pinegrow Online… connects the project with a project in Pinegrow Online. This sends the project to your Online workspace, not to a public website. It is described in Desktop–Online project sync.

When publishing does not finish

  • Publishing failed or Publication canceled with Nothing was published: click Review again to prepare a new review.
  • Publication outcome unconfirmed: the deploy may have completed. Click Check deployment history and check the site before publishing again.
  • Publication needs repair: some files were updated. Click Review repair to bring the destination back to a consistent state.
  • The included files are larger than 1GB: exclude large files and try again.
  • If a Netlify site, GitHub branch or SFTP folder changes after your review, for example because someone published from elsewhere, Pinegrow stops before replacing anything. Review and publish again.
  • A reconnect message for Cloudflare or GitHub: open Account settings… for the target and connect again.
  • Publishing is disabled for this project in CMS Mode: publishing is turned off in the project's CMS Mode settings.

Related