generated from CubeCraft-Creations/Tracehound
60 lines
1.3 KiB
YAML
60 lines
1.3 KiB
YAML
name: CI/CD
|
|
|
|
on:
|
|
push:
|
|
branches: [dev, main, agent/hermes/CUB-196-cameracard]
|
|
pull_request:
|
|
branches: [dev, main]
|
|
|
|
jobs:
|
|
lint-and-typecheck:
|
|
runs-on: go-react
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: npm
|
|
- run: npm ci
|
|
- run: npm run lint
|
|
- run: npx tsc --noEmit
|
|
|
|
test:
|
|
needs: lint-and-typecheck
|
|
runs-on: go-react
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: npm
|
|
- run: npm ci
|
|
- run: npm test
|
|
|
|
build:
|
|
needs: test
|
|
runs-on: go-react
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: npm
|
|
- run: npm ci
|
|
- run: npm run build
|
|
- name: Verify build output
|
|
run: |
|
|
du -sh dist/
|
|
echo "Build successful"
|
|
|
|
deploy:
|
|
needs: build
|
|
runs-on: go-react
|
|
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
|
environment: production
|
|
steps:
|
|
- name: Deploy placeholder
|
|
run: |
|
|
echo "Deploy target: /var/www/remote-rig/"
|
|
echo "Configure deploy command before merging to main"
|