# Deploys

> Run deploy jobs on BareCI's isolated on-demand machines, from the default branch or branches you list, with secrets as on GitHub-hosted runners.

Source: https://bareci.com/docs/modules/deploys

Deploy jobs run on BareCI in their own pools, selected with the `deploy` kind in the label:

```yaml
jobs:
  deploy:
    runs-on: bareci-2-deploy
    environment: production
    permissions:
      id-token: write
```

## How deploy pools differ

- **On-demand only**, so a spot interruption never cuts a deploy in half.
- **No hot tier** by default.
- **Never share a cache scope** with test jobs.
- **Allowed branches only:** the repository's default branch and the branches listed in its `deployBranches` setting, checked against the job's branch.

## Secrets and credentials

Credentials work as on GitHub-hosted runners: GitHub injects the environment's secrets into the job, and jobs should prefer OIDC to reach cloud providers. The machine itself has no cloud role and is destroyed after its one job, so a deploy's secrets never meet another job.

GitHub environment protection, such as required reviewers and wait timers, applies unchanged, because GitHub queues the job only after it passes.

## Later

Deploy history per environment on the dashboard is planned.
