From 1e747b5cb28dbe5dc1fbbe60ad51f24043a023a0 Mon Sep 17 00:00:00 2001 From: "dong.nguyen" Date: Sat, 10 Oct 2026 13:04:59 +0700 Subject: [PATCH] test vps deployment --- .gitea/workflows/deploy.yml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 30c12f3..8c1e8dd 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -20,5 +20,26 @@ jobs: - name: List files in the repository run: | ls ${{ gitea.workspace }} + - name: List files in dist + run: | ls ${{ gitea.workspace }}/dist - - run: echo "🍏 This job's status is ${{ job.status }}." \ No newline at end of file + - name: Install SSH key + uses: webfactory/ssh-agent@v0.10.0 + with: + ssh-private-key: ${{ secrets.DEPLOY_SSH_PRIVATE_KEY }} + + - name: Add VPS to known_hosts + run: | + mkdir -p ~/.ssh + + ssh-keyscan \ + -p "${{ secrets.DEPLOY_SSH_PORT }}" \ + "${{ secrets.DEPLOY_HOST }}" \ + >> ~/.ssh/known_hosts + + - name: Upload build + run: | + rsync -az --delete \ + -e "ssh -p ${{ secrets.DEPLOY_SSH_PORT }}" \ + dist/ \ + "${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }}:/opt/static-site/.incoming/" \ No newline at end of file