From 0a1c0acf2aed2d7be4aee83d0f10955462da94d8 Mon Sep 17 00:00:00 2001 From: ivanberry Date: Tue, 3 Mar 2026 12:23:24 +0800 Subject: [PATCH] ci: add Forgejo Actions workflow for build and deploy --- .gitea/workflows/deploy.yml | 50 +++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .gitea/workflows/deploy.yml 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!"