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"