Deploy your repository to Vertra Cloud on every push.
- Uses the official Vertra CLI binary, pinned to a release and verified by SHA-256.
- Uploads your project (respecting
.vertraignore) and restarts the application. - Works on Linux and macOS runners, x64 and ARM64.
name: Deploy
on:
push:
branches: [main]
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: vertracloud/github-action@v1
with:
api-key: ${{ secrets.VERTRA_API_KEY }}
app-id: ${{ secrets.VERTRA_APP_ID }}The application must already exist — this Action updates it, it does not create one.
- Create an API key in the Vertra Cloud dashboard with permission to manage the application's files.
- In your repository, open Settings → Secrets and variables → Actions and add:
| Secret | Value |
|---|---|
VERTRA_API_KEY |
Your Vertra Cloud API key |
VERTRA_APP_ID |
The ID of the application to deploy |
Never write the API key in the workflow file. The Action also masks it in the logs.
| Input | Required | Default | Description |
|---|---|---|---|
api-key |
yes | — | Vertra Cloud API key. Pass it from a secret. |
app-id |
yes | — | ID of the existing application. |
path |
no | . |
Directory to upload, relative to the repository root. |
restart |
no | true |
Restart the application after the upload. |
cli-version |
no | v0.1.0 |
Vertra CLI release tag to use. |
The Action has no outputs: the step succeeds when the deploy succeeds and fails otherwise.
Monorepo — upload a single directory:
- uses: vertracloud/github-action@v1
with:
api-key: ${{ secrets.VERTRA_API_KEY }}
app-id: ${{ secrets.VERTRA_APP_ID }}
path: apps/apiUpload without restarting:
- uses: vertracloud/github-action@v1
with:
api-key: ${{ secrets.VERTRA_API_KEY }}
app-id: ${{ secrets.VERTRA_APP_ID }}
restart: false- Files are merged. Uploaded files overwrite the ones already in the application; files that exist only in the application are kept.
- Ignored by default:
node_modules,.git,.github,.vscode,.venv,venv,vendor,target,.next,__pycache__and the.gitignore,.vertraignoreand.vertracloudignorefiles themselves. Add more patterns in a.vertraignoreat the root ofpath. - Limits: your plan's upload and storage limits apply.