Overview
The pipeline works like this:- Code is pushed to
main(or a dependency updates) - GitHub Actions runs
npm installandal push --headless --no-creds - Your server receives the updated project files and restarts the scheduler
Prerequisites
- A VPS already provisioned and working with
al push(see Deploying to a VPS) - Credentials already on the server (pushed once via
al pushlocally, or managed separately) - Your project in a GitHub repository
1. Set up GitHub secrets
You need two secrets in your GitHub repository (Settings > Secrets and variables > Actions):| Secret | Contents |
|---|---|
DEPLOY_SSH_KEY | SSH private key for the server (the same key used by al push) |
DEPLOY_ENV_TOML | Your environment TOML file contents |
Getting the environment TOML
Copy the contents of your environment file — this is the file at~/.action-llama/environments/<name>.toml on your local machine. It should look something like:
Set
keyPath to ~/.ssh/deploy_key — this is where the CI workflow will write the SSH key.Getting the SSH key
This is the private key thatal push uses to connect to your server. If you provisioned with al env prov, it was generated automatically and stored in the credential system. Copy it from:
2. Create the deploy workflow
Add this file to your project repository:al push in headless mode with credential syncing disabled.
3. Managing credentials separately
Since the CI workflow skips credentials (--no-creds), you need to push credentials to the server separately. Do this from your local machine:
al push --no-creds only syncs project files.
Cross-repo triggers
If your agent project depends on a package in another repository (e.g., a shared Action Llama fork), you can trigger deploys automatically when that upstream repo changes.Using repository dispatch
In the upstream repository’s CI workflow, add a step that fires a deploy event after tests pass:AGENTS_DEPLOY_TOKEN secret needs to be a GitHub personal access token (or fine-grained token) with contents: write permission on the agents repository.
Installing from GitHub instead of npm
If you want your agents project to always use the latest version from a GitHub repository rather than a published npm package, update yourpackage.json:
npm install runs in CI, it clones the repo, runs the prepare script (which builds the TypeScript), and installs the result. Combined with a repository dispatch trigger, this gives you fully automated end-to-end deployment: merge to the upstream repo triggers a deploy of your agents project with the latest version.
Verifying deploys
After a deploy, you can check the status from your local machine:al push prints deployment progress and a health check result at the end.
Next steps
- Deploying to a VPS — initial server setup
- CLI Commands — full
al pushflag reference - Credentials — how credentials are stored and synced