Velo: Publishing a Site with Git Integration & Wix CLI

Once you've used Git Integration & Wix CLI to edit your site's code and test it, you're ready to move it to your live site. This process includes 2 stages:

  1. Pushing your code to your site's GitHub repository.
  2. Publishing your site.

Push your code to GitHub

Your site's editor is synced with the default branch of your site's GitHub repository. Usually, this is the main branch, but you can change it to any branch you want.

To sync your code with the editor, push a commit to your repo's default branch. You can use other GitHub features like branches, pull requests, and reviews as you normally would.

Once you push a commit to your default branch, your code appears in the editor. The commit details appear in the GitHub Integration panel of the Velo Sidebar (Wix Editor), or in the Github section of the Code sidebar (Wix Studio).

Note: There may be a delay between when you push a commit to GitHub and when it appears in the editor.

Publish your site

When working with Git Integration & Wix CLI, you can publish your site either from the editor or from the Wix CLI. The different publishing options use different copies of your site's code and different UI versions, as follows:

Publishing MethodCode VersionUI Version
editorThe code in the default branch of your site's repo.The latest UI version, even if this version doesn't align with the code in your site's repo.
CLI - Latest commitThe code in the default branch of your site's repo.The UI version indicated in the wix.config.json file in your site's repo.
CLI - Local codeThe code saved in your IDE even if you haven't pushed it to GitHub.The UI version indicated in the wix.config.json file in your site's repo.

Publish from the Editor

To publish your site from the editor do the following:

  1. Open the editor.

  2. Click Publish.

  3. Note that a modal may appear warning you that you are about to publish the latest UI version. Click Continue.

Publish from the Wix CLI

To publish your site from the Wix CLI, do the following:

  1. Open your terminal and navigate to your site's repo.

  2. Run this command: wix publish.

  3. When you publish from the CLI, you can either use the code in your repo's default branch, or the code saved in your IDE.

    • To publish from your default branch, select Latest commit from {your repo's default branch}.

    • To publish from the code on your local computer, select Local code.

      Important:

      Publishing your local code leaves your live site and your site's GitHub repo out of sync. If you publish from the repo later without pushing your local code, your local code is overwritten and may be lost.

  4. Once you make a selection, the source of the code and UI version that are being used to publish are displayed in the terminal. A link to a preview site is also displayed. If you're sure you want to publish, press y.

    The terminal displays the URL of your published site and links to view logs and backend traffic.

Was this helpful?
Yes
No