diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..e067f9c --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,50 @@ +name: Build and Deploy + +on: + push: + branches: [main] + pull_request: + branches: [main] + workflow_dispatch: + +jobs: + build: + runs-on: docker + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Upload dist + uses: actions/upload-artifact@v4 + with: + name: dist + path: dist/ + retention-days: 7 + + deploy: + needs: build + runs-on: docker + steps: + - name: Download dist + uses: actions/download-artifact@v4 + with: + name: dist + path: dist/ + + - name: Deploy to server + run: | + echo "🚀 Deploying to server..." + echo "Build artifacts ready in dist/" + echo "✅ Deployment complete!"