> ## Documentation Index
> Fetch the complete documentation index at: https://docs.slai.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Integration into CI/CD

> You can integrate Beam into an existing CI/CD process to deploy your code automatically.

### Automated Deploys

It's fairly straightforward to setup automation for deploying your code to Beam. At a high level, the following steps are all you need:

```cURL theme={null}
curl https://raw.githubusercontent.com/slai-labs/get-beam/main/get-beam.sh -sSfL | sh
pip3 install --upgrade pip
pip3 install beam-sdk
beam configure --clientId=$BEAM_CLIENT_ID --clientSecret=$BEAM_CLIENT_SECRET --profile=$PROFILE
beam deploy app.py --$PROFILE
```

### Authentication

You can initialize Beam with inline [credentials](/beam/account/api-keys) using the `beam configure` command.

You can also add an optional field `--profileName` to override the default profile. For example, you might want separate dev, staging, and prod profiles.

```cURL theme={null}
beam configure --clientId="MY_CLIENT_ID" --clientSecret="MY_CLIENT_SECRET" --profileName="staging"
```

### Example: Deploy on Github Commit

You can setup a Github workflow to deploy your code whenever a new commit is made to your Git repo. Here's an example workflow:

```yaml deploy-to-beam.yml theme={null}
name: deploy-beam

on:
  push:
    branches:
      - master

jobs:
  deploy:
    name: Deploy
    runs-on: ubuntu-latest
    environment: production

    steps:
      - uses: actions/checkout@v3
      - name: Authenticate Beam and Deploy
        env:
          BEAM_CLIENT_ID: ${{ secrets.BEAM_CLIENT_ID }}
          BEAM_CLIENT_SECRET: ${{ secrets.BEAM_CLIENT_SECRET }}
          PROFILE: ${{ secrets.BEAM_PROFILE }}
        run: |
          curl https://raw.githubusercontent.com/slai-labs/get-beam/main/get-beam.sh -sSfL | sh
          pip3 install --upgrade pip
          pip3 install beam-sdk
          beam configure --clientId=$BEAM_CLIENT_ID --clientSecret=$BEAM_CLIENT_SECRET
          beam deploy app.py
```
