generated from CubeCraft-Creations/Tracehound
b1edabd3da
On the go-react runner image, npm/node/go already work (npm ci succeeds), but the setup-go/setup-node actions install tool-cache binaries that can't execute on this runner (node/22.22.3/x64: "cannot execute"), failing the jobs in their post steps. Drop those actions and use the image's built-in toolchains; also reduces flaky github.com action clones. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
54 lines
1.2 KiB
YAML
54 lines
1.2 KiB
YAML
name: CI/CD
|
|
|
|
on:
|
|
push:
|
|
branches: [dev, main]
|
|
pull_request:
|
|
branches: [dev, main]
|
|
|
|
jobs:
|
|
lint-and-typecheck:
|
|
runs-on: go-react
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- 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
|
|
- run: npm ci
|
|
- run: npm test
|
|
|
|
build:
|
|
needs: test
|
|
runs-on: go-react
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- run: npm ci
|
|
- run: npm run build
|
|
- name: Upload build artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: dist
|
|
path: cmd/server/src/dist/
|
|
|
|
deploy:
|
|
needs: build
|
|
runs-on: go-react
|
|
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
|
environment: production
|
|
steps:
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
name: dist
|
|
path: dist/
|
|
- name: Deploy static files
|
|
run: |
|
|
echo "Deploying to production..."
|
|
echo "Deploy target: /var/www/remote-rig/"
|
|
echo "Placeholder — configure deploy target before merging to main"
|