GitHub Actions for deploying to dployr.
| Action | Description |
|---|---|
dployr-io/dployr-actions/setup@v1 |
Install the dployr CLI |
dployr-io/dployr-actions/deploy@v1 |
Deploy an application |
- uses: dployr-io/dployr-actions/setup@v1
with:
version: latest # optionalInstalls the dployr CLI and adds it to PATH. Use this if you want to run CLI commands directly.
- uses: dployr-io/dployr-actions/deploy@v1
with:
token: ${{ secrets.DPLOYR_TOKEN }}
name: my-api
source: remote
runtime: nodejs
remote: https://github.com/org/repo
branch: mainRequired
| Input | Description |
|---|---|
token |
API token with oidc:bind scope |
name |
Deployment name |
source |
remote or image |
runtime |
nodejs, python, golang, php, ruby, dotnet, java, static |
Source
| Input | Description |
|---|---|
remote |
Git remote URL — required when source: remote |
branch |
Branch to deploy |
commit |
Specific commit hash |
image |
Docker image — required when source: image |
Runtime
| Input | Description |
|---|---|
runtime-version |
e.g. 20 for Node.js, 3.11 for Python |
build-cmd |
Build command |
run-cmd |
Start command |
port |
Port the app listens on |
Service
| Input | Description |
|---|---|
type |
web, worker, static, or job |
domain |
Custom domain |
health-check |
Health check path (e.g. /health) |
working-dir |
Working directory inside the container |
static-dir |
Directory to serve (static runtime) |
force-rebuild |
Bypass image cache — true or false (default: false) |
Environment
env-vars: |
NODE_ENV=production
PORT=3000
secrets: |
DATABASE_URL=${{ secrets.DATABASE_URL }}
API_KEY=${{ secrets.API_KEY }}Other
| Input | Description |
|---|---|
cluster |
Target cluster name |
cli-version |
CLI version to install (default: latest) |
Node.js app from GitHub
- uses: dployr-io/dployr-actions/deploy@v1
with:
token: ${{ secrets.DPLOYR_TOKEN }}
name: my-api
source: remote
runtime: nodejs
runtime-version: '20'
remote: https://github.com/dployr-io/dployr-examples
branch: master
build-cmd: npm install && npm run build
run-cmd: npm start
port: 3000Docker image
- uses: dployr-io/dployr-actions/deploy@v1
with:
token: ${{ secrets.DPLOYR_TOKEN }}
name: my-api
source: image
runtime: nodejs
image: ghcr.io/org/my-api:${{ github.sha }}Create a personal access token:
dployr auth tokens create --name "github-actions" --scope oidc:bindAdd it as DPLOYR_TOKEN in your repository secrets.
The token owner must have Developer role or higher on the target cluster.