From 7c03c5d420847640d0ab69b4e95b752fe5d0e0df Mon Sep 17 00:00:00 2001 From: siujamo Date: Tue, 23 Jun 2026 10:50:32 +0800 Subject: [PATCH] ci: add Gitea Actions workflow for deploying to onixbyte.cn Sync doc_build/ to the onixbyte.cn server via rsync over SSH. --- .gitea/workflows/deploy-onixbyte.yml | 34 ++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .gitea/workflows/deploy-onixbyte.yml diff --git a/.gitea/workflows/deploy-onixbyte.yml b/.gitea/workflows/deploy-onixbyte.yml new file mode 100644 index 0000000..458cf4b --- /dev/null +++ b/.gitea/workflows/deploy-onixbyte.yml @@ -0,0 +1,34 @@ +name: Deploy to OnixByte.cn + +on: + push: + branches: [main] + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + + - name: Install pnpm + run: npm install -g pnpm + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Build + run: pnpm build + + - name: Deploy to OnixByte.cn + run: | + mkdir -p ~/.ssh + echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/id_ed25519 + chmod 600 ~/.ssh/id_ed25519 + ssh-keyscan onixbyte.cn >> ~/.ssh/known_hosts + rsync -avz --delete doc_build/ root@onixbyte.cn:${{ vars.DEPLOY_PATH }}