Deployment & CI/CD
Run Scuba in production the sensible way. PM2 for process supervision, GitHub Actions for releases, optional Docker for a clean host.
PM2 on your own machine
The default recipe — a PM2 daemon on your dev box, laptop, or a small VPS.
bash
pm2 start studentsync --name student-daemonpm2 savepm2 startup # adds a system-level hookpm2 logs student-daemon --lines 200Docker
A minimal container image is published on each release:
bash
docker run -d \ --name studentsync \ -v ~/.studentsync:/root/.studentsync \ -e TELEGRAM_BOT_TOKEN=$TELEGRAM_BOT_TOKEN \ -e GEMINI_API_KEY=$GEMINI_API_KEY \ ghcr.io/ayush-vish/studentsync:latestVPS deployment
- Any 1 vCPU / 1 GB VPS works for a single user.
- Resume compiles need Docker on the host, or at least ~500 MB of free RAM.
- Open no inbound ports — Scuba initiates connections to Telegram, not the other way around.
GitHub Actions CI/CD
This project ships with an Actions workflow that builds TypeScript, runs tests, and publishes to npm on every tagged commit using the zero-trust provenance spec.
.github/workflows/release.yml
on: push: tags: ["v*"]jobs: release: runs-on: ubuntu-latest permissions: contents: read id-token: write steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: { node-version: 20, registry-url: "https://registry.npmjs.org" } - run: npm ci && npm test && npm run build - run: npm publish --provenance --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}Provenance on npm
Packages show a green Built and signed on GitHub Actions badge. Users can verify the provenance with
npm audit signatures.Zero-downtime upgrades
bash
npm install -g studentsync@latestpm2 reload student-daemonreload spins up a new process before killing the old one, so in-flight Telegram updates never drop.