From bb3f5bb0fb45b6c7855229e0f17512af9dcb771c Mon Sep 17 00:00:00 2001 From: Leilukin Date: Sat, 19 Apr 2025 22:45:09 +0800 Subject: [PATCH] Use SSH Deploy GitHub action for deploying leilukin.com --- .gitea/workflows/hostinger.yml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/hostinger.yml b/.gitea/workflows/hostinger.yml index f41f4b81..8f3a563c 100644 --- a/.gitea/workflows/hostinger.yml +++ b/.gitea/workflows/hostinger.yml @@ -3,7 +3,7 @@ name: Deploy to Hostinger on: push: branches: - - main # The branch name your are commit the new changes + - main jobs: build: @@ -22,13 +22,15 @@ jobs: run: bun install - name: Build - run: bun run build # The build command of your project + run: bun run build - - name: Push to another branch - uses: s0/git-publish-subdir-action@develop - env: - REPO: self - BRANCH: build # The branch name where you want to push the assets - FOLDER: ./_site # The directory where your assets are generated - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub will automatically add this - you don't need to bother getting a token - MESSAGE: "Build: ({sha}) {msg}" # The commit message \ No newline at end of file + - name: SSH Deploy to Hostinger + uses: easingthemes/ssh-deploy@main + with: + SSH_PRIVATE_KEY: ${{ secrets.HOSTINGER_SSH_PRIVATE_KEY }} + ARGS: "--delete" + SOURCE: "_site/" + REMOTE_HOST: ${{ secrets.REMOTE_HOST }} + REMOTE_USER: ${{ secrets.REMOTE_USER }} + TARGET: ${{ secrets.REMOTE_TARGET }} + EXCLUDE: "/node_modules/ /host/"