From 1854a1cb2b61c9822230e31691adc8815e4effdb Mon Sep 17 00:00:00 2001 From: Hermes Date: Thu, 21 May 2026 14:16:35 +0000 Subject: [PATCH] ci: add Gitea Actions pipeline (lint, typecheck, test, build, deploy) --- .gitea/workflows/ci.yaml | 65 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 .gitea/workflows/ci.yaml diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml new file mode 100644 index 0000000..f6fc484 --- /dev/null +++ b/.gitea/workflows/ci.yaml @@ -0,0 +1,65 @@ +name: CI/CD + +on: + push: + branches: [dev, main] + pull_request: + branches: [dev, main] + +jobs: + lint-and-typecheck: + runs-on: ubuntu-latest + 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: ubuntu-latest + 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: ubuntu-latest + 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: dist/ + + deploy: + needs: build + runs-on: ubuntu-latest + 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"