Home platformOS Logo

Deploy or Sync

Last edit: Jun 09, 2020

To be able to see your changes on your site, you have to deploy those changes to your Instance.

Note

This step describes two different methods. If this is your first go, we recommend to follow the process described in the "Deploying" section.

Deploying

To deploy all changes, run the deploy command:


pos-cli deploy [environment]

Example:


pos-cli deploy staging

A progress indicator shows that the deployment is in progress, and once it finishes, a "Deploy succeeded after is displayed.

We recommend to first deploy to staging, test, and only then trigger a deployment to production. In practice, deploy creates a zip file that contains all your files, and sends it to the API. It is then processed in the background. We store each zip file, so that you can roll back in case something goes wrong.

Developer guide icon

Learn more about our recommendations for version control and deployment on platformOS in the Development Workflow topic.

Syncing

To immediately push changes in your codebase to the environment, run the sync command:


pos-cli sync [environment]

Example:


pos-cli sync staging

Using the sync command feels like working on localhost. It is recommended to use sync only for staging environments, as pushing changes immediately to production can be dangerous. Please note, that unlike deploy, this command will not delete resources when you delete the file.


After you have deployed your Instance, refresh your site in your browser. The home page has changed to include the text you added.

Congratulations, you have finished our Hello, World! guide: You have set up your environment and learned how to change something on your site and deploy it.

Contribute to this page

Github Icon

Questions?

We are always happy to help with any questions you may have.

contact us