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:
- The address of the repository, something like
git@example.com:user/project.git. - 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.
main means all commits pushed to the main branch will create a new deployment. v*, will mean only tags matching the pattern (e.g., v1.0.0, v2.1.3) will create deployments. 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
A push to your git repository on the watched branch or tag creates a new deploy but waits for you to manually trigger the deployment when ready from the Webslice Console.
Use this when:
- You want to review or test the build before going live
- Coordinating deployments with other changes
- Deploying during specific maintenance windows
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:
- Commits are pushed to your git repository on branch
main - The webhook is triggered to Webslice, letting us know there’s new commits
- A new deploy is triggered, by checking out the entire repository
- If configured to, your build script runs to install dependencies and build your site
- The deploy goes live, with your latest code and starts serving traffic
- If configured to, your release script runs for post-deployment tasks