a22a docs

Deploying from CI

Deploy your workflows from a pipeline when they change on your main branch.

Keep your workflows in your repository under a22a/, and run a22a deploy when they change on your main branch. Deploying a project that has not changed creates no new version, so it is safe to run on every push.

GitHub Actions

Add your API key as a repository secret named A22A_API_KEY, then add this workflow:

.github/workflows/a22a.yml
name: a22a

on:
  push:
    branches: [main]
    paths: ["a22a/**"]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 22
      - run: npm ci
      - run: npx a22a deploy
        env:
          A22A_API_KEY: ${{ secrets.A22A_API_KEY }}

The job runs when a file under a22a/ changes on main, and prints each project's new version and workflow URLs. If @a22a/sdk is not in your package.json, drop the npm ci step and deploy with:

npx --yes --package=@a22a/sdk a22a deploy

Other CI

Any CI works the same way: Node.js 20.19 or later, A22A_API_KEY set as a secret, then npx a22a deploy from the repository root. To deploy one project, name it:

npx a22a deploy acme

When a deploy fails

Exit codeMeaning
0Every project deployed.
2The key is missing, a workflow file failed its checks, or the API rejected a project.

deploy checks every workflow file before sending any, so a malformed file stops the job with nothing deployed. The API then checks each project as it is sent. If it rejects one, the job stops there, and the projects sent before it stay deployed.

Pull requests

Do not run deploy on pull requests. There is no way to check workflows without deploying them yet, and every API key deploys to the same projects. See Coming soon.

On this page