Skip to content

Git Deploys

Using git and continuous deployment is our recommended way to deploy to our serverless platform. It gives you the most seamless and consistent experience. Currently, git deploys are designed to work with GitHub, GitLab and Bitbucket.

Git deploys are atomic and create a new versioned deploy in full for each push to the selected branch or tag. Any modifications made outside of git to the live website will not persist between deployments. Please use the shared persistent storage to store objects that need to be retained between deployments.

Connecting Your Repository

To connect a git repoistory to Webslice you will need two things:

  1. The address of the repository, something like git@example.com:user/project.git.
  2. Access to configure Deploy Keys, and Webhooks on that repository, this usually requires write, or admin access.

With those you can connect the repository, via either the Deploys or Settings menu when viewing your website in the Webslice Console. Follow the instructions in the form and it will take you through the process of connecting and verifying access to your repository.

Deploy Triggers

Webslice can either watch a specific branch, or pattern match tags. This is helpful for you to control when a deploy is triggered. This setting can be changed at any time.

Configure deployments to trigger on commits to a specific branch such as main means all commits pushed to the main branch will create a new deployment.

Deploy Modes

Deploys can be triggered automatically or manually based on your choice.

A push to your git repository on the watched branch or tag creates a new deploy and automatically pushes the update live to your website. This option is powerful and easy to use but requires good testing and processes.

Use this when:

  • Deploying from a production branch with tested code
  • You want fast updates to your live site
  • Your team follows strict merge/review processes

Deployment Logs

While there are no detailed logs for the deploy action itself, you can view the logs from your your build and release scripts at any time by clicking on either the Website Deployment or Website Release Phase entries under Activity when viewing your website.

These logs can be helpful for debugging failed deployments or verifying your build/release process.

Deployment Workflow

If you’re curious how deploys actually work on Webslice and the order things will happen in this is for you:

  1. Commits are pushed to your git repository on branch main
  2. The webhook is triggered to Webslice, letting us know there’s new commits
  3. A new deploy is triggered, by checking out the entire repository
  4. If configured to, your build script runs to install dependencies and build your site
  5. The deploy goes live, with your latest code and starts serving traffic
  6. If configured to, your release script runs for post-deployment tasks