Github Actions Integration
This guide shows how to automatically deploy your application to Sliplane using Github Actions. At the end of this guide, you will be able to push to your repository, build your Docker image, push it to Github Container Registry, and deploy it to Sliplane. All automatically.
Setup Steps
-
Configure Github Repository Settings
- Go to your repository’s Settings > Actions > General
- Under “Workflow permissions”, enable “Read and write permissions”
-
Create Github Personal Access Token
- Go to Github Token Settings
- Create a classic token with
read:packages
permission
-
Add Registry Credentials to Sliplane
- Navigate to Registry Credentials
- Select “ghcr.io” as registry
- Enter your Github username and PAT token
-
Configure Github Secrets
- In your repository settings, add a new secret named
DEPLOY_SECRET
- Copy the
dhs_
part from your Sliplane deploy hook URL (see last screenshot)
- In your repository settings, add a new secret named
-
Add Workflow File Create
.github/workflows/deploy.yml
with the following content:
- Update Workflow Configuration
In the workflow file above:
- Replace
your-name
with your Github username - Replace
your-repo
with your repository name - Replace
your-service-id
with your Sliplane service ID (found in service dashboard)
- Replace
Now when you push to the main branch, Github Actions will automatically build your Docker image and deploy it to Sliplane.