Skip to content

dployr-io/dployr-actions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

dployr-actions

GitHub Actions for deploying to dployr.

Actions

Action Description
dployr-io/dployr-actions/setup@v1 Install the dployr CLI
dployr-io/dployr-actions/deploy@v1 Deploy an application

Setup

- uses: dployr-io/dployr-actions/setup@v1
  with:
    version: latest  # optional

Installs the dployr CLI and adds it to PATH. Use this if you want to run CLI commands directly.


Deploy

- 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: main

Inputs

Required

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)

Examples

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: 3000

Docker 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 }}

Token

Create a personal access token:

dployr auth tokens create --name "github-actions" --scope oidc:bind

Add it as DPLOYR_TOKEN in your repository secrets.

The token owner must have Developer role or higher on the target cluster.


Full documentation →

About

GitHub Actions for dployr

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors