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

# Setting Up CI/CD

> Auto-deploy when you push code

## Set Up Continuous Deployment

```
set up CI/CD for this project
```

Monk configures GitHub Actions to auto-deploy on every push to main.

→ [Build & CI/CD](/features/build-and-cicd)

## What You Need

* GitHub repository (your project must be in GitHub)
* Already deployed application
* **Optional:** GitHub Personal Access Token (for automatic setup)

## With GitHub PAT (Automatic)

```
You: set up CI/CD

Monk: I'll need a GitHub Personal Access Token to configure this automatically.
      Create one at: https://github.com/settings/tokens

You: [Provides PAT]

Monk: ✓ Created GitHub Actions workflow
      ✓ Injected deployment keys
      ✓ CI/CD ready - push to main to deploy
```

## Without PAT (Manual)

```
You: set up CI/CD

Monk: I've generated the GitHub Actions workflow.
      Please manually add these secrets to your repository:

      [Shows step-by-step instructions]
```

## Deploying Updates

Once CI/CD is set up, simply push code to your main branch:

**Commit and push your changes:**

Your deployment triggers automatically when code reaches the main branch. No need to tell Monk - GitHub Actions handles it.

## Deploy Manually (Alternative)

```
deploy the latest changes
```

Deploy updates without CI/CD.

→ [Updates & Maintenance](/features/updates-and-maintenance)

## Prevent Dependency Upgrades

```
deploy but don't upgrade dependencies
```

Update only your code, keep databases/services at current versions.

## What Gets Auto-Deployed

* **Code changes** - Updated services
* **New services** - Added components
* **Configuration changes** - Environment variables
* **Container updates** - New dependencies

## Smart Rebuilds

Monk only rebuilds what changed:

* Changed frontend → Rebuilds frontend only
* Changed API → Rebuilds API container
* No changes → Skips rebuild

## Next Steps

* [Monitor & Debug](/prompting/monitoring-and-debugging) - Watch deployments
* [Managing Costs](/prompting/managing-costs) - Track CI/CD impact on costs
