36 lines
961 B
YAML
36 lines
961 B
YAML
name: PROMPT CI and deployment
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
verify-and-deploy:
|
|
runs-on: ces-control
|
|
timeout-minutes: 20
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 24
|
|
cache: npm
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
- name: Type check
|
|
run: npm run typecheck
|
|
- name: Unit tests
|
|
run: npm test
|
|
- name: Production build
|
|
run: npm run build
|
|
- name: Test standalone production server
|
|
run: npm run test:smoke
|
|
- name: Deploy persistent systemd service
|
|
if: gitea.ref == 'refs/heads/main' && (gitea.event_name == 'push' || gitea.event_name == 'workflow_dispatch')
|
|
env:
|
|
RELEASE_SHA: ${{ gitea.sha }}
|
|
run: bash scripts/deploy.sh "$RELEASE_SHA" "$(command -v node)"
|