Examples
Deploy every branch of a project bohr hosts
Section titled “Deploy every branch of a project bohr hosts”name: Deployon: { push: { branches: ['**'] } }permissions: { contents: read, id-token: write }jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - uses: actions/setup-node@v5 with: { node-version: 22 } - run: npm ci && npm run build # the project's own build - id: deploy uses: bohr-io/deploy-action@v1 - run: echo "Deployed to ${{ steps.deploy.outputs.url }}"A project in a subfolder
Section titled “A project in a subfolder” - run: npm ci && npm run build working-directory: apps/web - uses: bohr-io/deploy-action@v1 with: working-directory: apps/webA self-hosted instance
Section titled “A self-hosted instance” - uses: bohr-io/deploy-action@v1 with: instance-url: https://bohr.example.comCredentials for wrangler (projects in your own account)
Section titled “Credentials for wrangler (projects in your own account)”This is the part of the workflow bohr writes for you (full workflow). The file must be .github/workflows/bohr-deploy.yml, running on pushes to the production branch:
permissions: { contents: read, id-token: write }jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - uses: actions/setup-node@v5 - name: bohr credentials id: bohr-credentials uses: bohr-io/deploy-action@v1 with: credentials: "true" - run: npm ci && npm run build # sees the build variables - run: npx wrangler deploy env: CLOUDFLARE_API_TOKEN: ${{ steps.bohr-credentials.outputs.cloudflare-api-token }} CLOUDFLARE_ACCOUNT_ID: ${{ steps.bohr-credentials.outputs.cloudflare-account-id }}The CLI as a plain step
Section titled “The CLI as a plain step”The same deploy without the action:
- id: bohr run: npx --yes bohr@latest deploy - run: echo "Deployed to ${{ steps.bohr.outputs.url }}"See CI usage.