From d6f01ee135ed9f6f1fbd5ab1cea7b93a637bac76 Mon Sep 17 00:00:00 2001 From: admin Date: Tue, 18 Aug 2026 10:19:54 +0000 Subject: [PATCH] Initial commit --- .gitea/workflows/deploy.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 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..ac6132c --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,28 @@ +name: Deploy Bun App + +on: + push: + branches: [main] + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup SSH + run: | + mkdir -p ~/.ssh + echo "${{ secrets.DEPLOY_KEY }}" | base64 -d | base64 -d > ~/.ssh/id_deploy + chmod 600 ~/.ssh/id_deploy + ssh-keyscan -H 172.17.0.1 >> ~/.ssh/known_hosts 2>/dev/null || true + + - name: Deploy to server + run: | + ssh -o StrictHostKeyChecking=accept-new \ + -o UserKnownHostsFile=/dev/null \ + -i ~/.ssh/id_deploy \ + deploy@172.17.0.1 \ + 'sudo /home/deploy/scripts/deploy-bun.sh main'