generated from CubeCraft-Creations/Tracehound
50e672e753
The workflows used runs-on: ubuntu-latest, which mapped to docker.gitea.com/runner-images:ubuntu-latest — an image whose Node from setup-node won't execute (exit 127) and which lacks curl/jq. The runner already advertises a purpose-built "go-react" CI image; point the workflows at it instead. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
66 lines
1.4 KiB
YAML
66 lines
1.4 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
|
|
- 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: 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"
|