08 / Deploys
Deploys on isolated, on-demand machines
Deploy jobs run in their own pools on on-demand machines, so a spot interruption never cuts a deploy in half. They are accepted only from the default branch or branches you list, and each machine is destroyed after its one job, so a deploy's secrets never meet another job.
jobs:
deploy:
runs-on: bareci-2-deploy
environment: production
permissions:
id-token: write How it works
Secrets as on GitHub-hosted runners
GitHub injects the environment's secrets into the job. The machine itself has no cloud role; jobs should use OIDC to reach cloud providers.
Environment rules unchanged
Required reviewers and wait timers on GitHub environments apply as before, because GitHub queues the job only after they pass.
Kept apart from tests
Deploy pools never share a cache with test jobs and have no hot tier by default.
Later Deploy history per environment on the dashboard is planned.
Questions
Which branches can deploy?
The repository's default branch and any branches listed in its settings. Jobs from other branches are refused.