Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions .github/workflows/provision-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,31 @@ name: Provision and Deploy Bot

on:
push:
branches:
- master
- prod
workflow_dispatch:

concurrency:
group: provision-and-deploy-bot-${{ github.ref_name }}
cancel-in-progress: false

jobs:
ci:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6.0.2
- uses: actions/setup-node@v6.4.0
with:
node-version: 24
cache: npm
- run: npm ci
- run: npm run lint:check
- run: npm run typecheck
- run: npm run test

gate:
needs: ci
if: github.ref_name == 'master' || github.ref_name == 'prod'
runs-on: ubuntu-latest
environment: ${{ github.ref_name == 'prod' && 'prod-gate' || 'dev-gate' }}
permissions:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ---- Base ----
FROM node:23-alpine AS base
FROM node:24-alpine AS base

WORKDIR /app

Expand Down
4 changes: 3 additions & 1 deletion INFRA.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,12 @@ guild so you can poke at it):
approvals on push.

**Promotion workflow:** feature branch → PR to `master` → merge → dev deploys
automatically (gated by `dev-gate`) → open PR `master → prod` → branch
automatically (gated by `dev-gate`) → open PR [`master → prod`][promote-pr] → branch
protection confirms the head SHA succeeded on dev → merge → prod deploys
(gated by `prod-gate`).

[promote-pr]: https://github.com/getBoolean/Event-Queue-Bot/compare/prod...getBoolean:Event-Queue-Bot:master

Prod and dev share no state: separate droplets, separate `data/main.sqlite`,
separate Discord applications.

Expand Down
2 changes: 2 additions & 0 deletions README-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ Pushes to `master` trigger `.github/workflows/provision-and-deploy.yml`, which r

Secrets, variables, and SSH key setup live in [`INFRA.md`](INFRA.md). For SSH access to the droplet, see [`INFRA.md` → "Connect to the Droplet"](INFRA.md#connect-to-the-droplet).

To promote `master` to prod, open the prefilled compare PR: [`master → prod`](https://github.com/getBoolean/Event-Queue-Bot/compare/prod...getBoolean:Event-Queue-Bot:master).

## Data storage and access

The bot uses a SQLite database, which is stored in the `data/main.sqlite` file.
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,7 @@ OAuth scopes: `bot`, `applications.commands`.
- **Read Message History** — update existing displays
- **Send Messages** — post displays and responses
- **View Channels** — read channels

## Maintainer shortcuts

- Promote `master` → `prod`: [open compare PR](https://github.com/getBoolean/Event-Queue-Bot/compare/prod...getBoolean:Event-Queue-Bot:master)
Loading