After your tests
Add the deploy step after your workflow’s tests and build, so files are sent only when the previous steps pass.
Vertra + GitHub Actions
Your code is already on GitHub. Add the official Action to your workflow and update your Vertra application as part of your development process.
Push to main
git push
Repository checkout
actions/checkout
Upload to Vertra
vertracloud/github-action
Application restart
restart: true
Save this file in your repository to deploy on every push to main. Create the application in Vertra before your first deployment.
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 }}Add VERTRA_API_KEY and VERTRA_APP_ID under Settings → Secrets and variables → Actions in your repository. Never put the key directly in this file.
Fit deployment into the steps that already make up your development process.
Add the deploy step after your workflow’s tests and build, so files are sent only when the previous steps pass.
Use path to send just the application directory, such as apps/api, without packaging the entire repository.
Authenticate with an API key stored in GitHub Secrets. You stay in control of its permissions.
The Action packages your project, respects .vertraignore and .vertracloudignore, and lets you choose whether to restart after uploading.
Create the application in Vertra, copy its ID and generate an API key with the permissions needed for uploads and restarts.
In your repository, save the key as VERTRA_API_KEY and the ID as VERTRA_APP_ID in GitHub Actions secrets.
Create .github/workflows/deploy.yml using the example above. Push to main and follow the run in the Actions tab.
No. It updates files in an existing application identified by app-id. Create the application in the dashboard before running the workflow.
Yes. The example uses push to main, but you can configure GitHub Actions events to match your process, including tags or manual runs.
Uploaded files overwrite matching paths. Files already in the application but absent from the upload remain there; deployment does not delete them.
Yes. Set restart to "false". The default is "true", which restarts the application after uploading. Upload and plan limits still apply.
Vertra + GitHub Actions
Set it up once and follow each run on GitHub.