Skip to main content

Setting up CI

Abstra's pip package also includes a command-line interface (CLI) that allows you to interact with the platform from your terminal. This is useful for automating tasks, such as deploying your projects to the cloud.

Use abstra deploy to deploy your project to the cloud. This command will upload your project to the cloud and start a new deployment.

Note that you must have the ABSTRA_API_TOKEN environment variable set in your terminal to use the CLI. You can find your API key in the Cloud Console.

Example using GitHub Actions

  • Create a new secret in your repository settings named ABSTRA_API_TOKEN and paste your API key as the value.
  • Create a new workflow file in your repository, such as .github/workflows/deploy.yml.
  • Add the following code to the file:
name: Deploy to Abstra

on:
push:
branches:
- main
workflow_dispatch:

jobs:
Deploy:
runs-on: ubuntu-latest
env:
ABSTRA_API_TOKEN: ${{ secrets.ABSTRA_API_TOKEN }}

steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v2
with:
python-version: 3.11

- name: Setup
run: pip install --upgrade abstra

- name: Deploy
run: abstra deploy