diff --git a/.gitea/workflows/build-deploy.yml b/.gitea/workflows/build-deploy.yml new file mode 100644 index 0000000..2e84df7 --- /dev/null +++ b/.gitea/workflows/build-deploy.yml @@ -0,0 +1,37 @@ +name: Build and Deploy + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install dependencies + run: npm install --registry=https://registry.npmmirror.com + + - name: Build project + run: npm run build + + - name: Deploy to server + uses: appleboy/scp-action@v0.1.7 + with: + host: baishe.honor3.com + port: 22 + username: root + password: ${{ secrets.SSH_PWD }} + source: "dist/*" + target: "/app/staticwebs/seckit"