> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt ## Resource: Publish a Site with Git Integration and Wix CLI ## Article: Publish a Site with Git Integration and Wix CLI ## Article Link: https://dev.wix.com/docs/develop-websites-sdk/code-your-site/developer-environments/ides/git-integration/publish-a-site-with-git-integration-and-wix-cli.md ## Article Content: # Publish a Site with Git Integration & Wix CLI Once you've used [Git Integration & Wix CLI](https://dev.wix.com/docs/develop-websites-sdk/code-your-site/developer-environments/ides/git-integration/about-git-integration-with-wix-cli.md) to edit a site's code and test it, you're ready to move it to the live site. This process includes 2 stages: 1. Pushing the code to the site's GitHub repository. 2. Publishing the site. ## Step 1 | Push code to GitHub A site's editor is synced with the [default branch](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches#about-the-default-branch) of the site's GitHub repository. Usually, this is the `main` branch, but you can [change it](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/changing-the-default-branch) to any branch you want. To sync the code with the editor, push a commit to the 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 the default branch, the code appears in the editor. The commit details appear in the **GitHub Integration** panel of the Code sidebar (Wix Editor), or in the **Github** section of the Code sidebar (Wix Studio). ![GitHub Integration panel](https://wixmp-833713b177cebf373f611808.wixmp.com/images/d2a2eb8831668eb1640e1d29361fe29d.png) > **Note:** > There may be a delay between when you push a commit to GitHub and when it appears in the editor. ## Step 2 | Publish the site When working with Git Integration & Wix CLI, you can publish a site either from the editor or from the [Wix CLI](https://dev.wix.com/docs/develop-websites-sdk/code-your-site/developer-environments/ides/git-integration/wix-cli-commands.md). The different publishing options use different copies of the site's code and different [UI versions](https://dev.wix.com/docs/develop-websites-sdk/code-your-site/developer-environments/ides/git-integration/about-the-local-editor.md#about-ui-versions), as follows: | Publishing Method | Code Version | UI Version | | ------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Editor | The code in the default branch of the site's repo. | The latest UI version, even if this version doesn't align with the code in the site's repo. | | CLI - Latest commit | The code in the default branch of the site's repo. | The UI version indicated in the [wix.config.json](https://dev.wix.com/docs/develop-websites-sdk/code-your-site/developer-environments/ides/git-integration/git-repository-file-structure.md#wixconfigjson) file in the site's repo. | | CLI - Local code | The code saved in your IDE even if you haven't pushed it to GitHub. | The UI version indicated in the [wix.config.json](https://dev.wix.com/docs/develop-websites-sdk/code-your-site/developer-environments/ides/git-integration/git-repository-file-structure.md#wixconfigjson) file in the site's repo. | > **Note:** Before you publish your site, make sure to save any changes you've made in the editor. Unsaved changes won't be included in the published site. ### Publish from the editor To publish a site from the editor do the following: 1. Open the editor. 2. Click **Publish** on the top-right. 3. Note that a modal may appear warning you that you are about to publish the latest UI version. Click **Continue**. ### Publish from the CLI To publish a site from the CLI, do the following: 1. Open a terminal and navigate to the site's repo. 2. Run this command: `wix publish`. 3. When you publish from the CLI, you can either use the code in the repo's default branch, or the code saved in your IDE. - To publish from the default branch, select `Latest commit from {the repo's default branch}`. - To publish from the code on your local environment, select `Local code`. **Important:** Publishing local code leaves the live site and the 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 the published site and links to view logs and backend traffic. ## See also - [Wix CLI commands](https://dev.wix.com/docs/develop-websites-sdk/code-your-site/developer-environments/ides/git-integration/wix-cli-commands.md) - [About Automated Workflows and the Wix CLI](https://dev.wix.com/docs/develop-websites-sdk/code-your-site/developer-environments/ides/git-integration/about-automated-workflows-and-the-wix-cli.md) - [Fix a Broken Git Integration](https://dev.wix.com/docs/develop-websites-sdk/code-your-site/developer-environments/ides/git-integration/fix-a-broken-git-integration.md)