From d579a52a7f7ee7cd18a7c793abe1b6258cb628fa Mon Sep 17 00:00:00 2001 From: changsongd Date: Tue, 10 Jun 2025 20:46:48 +0800 Subject: [PATCH] v9 --- .gitea/workflows/build.yml | 15 ++++++++++++--- hugo.yaml | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index d6a1360..b814e9b 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -3,7 +3,7 @@ run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 on: [push] jobs: - build-and-deploy: + build-and-deploy-to-local-server: runs-on: ubuntu-latest env: HUGO_VERSION: '0.147.5' @@ -22,9 +22,18 @@ jobs: - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." - name: Build with Hugo run: hugo - - name: Deploy + - name: Local Deploy run: | rm -rf /workspace/html/blog mkdir -p /workspace/html/blog cp -r public/* /workspace/html/blog/ - - run: echo "🍏 This job's status is ${{ job.status }}." \ No newline at end of file + - run: echo "🍏 This job's status is ${{ job.status }}." + + deploy-to-remote-server: + needs: build-and-deploy-to-local-server + runs-on: mac + steps: + - name: Deploy to remote server + run: | + ssh root@1970666.xyz "rm -rf /root/docker/docker-nginx/html/blog" + scp -r /Users/konjacpotato/Workspace/docker/docker-nginx/html/blog root@1970666.xyz:/root/docker/docker-nginx/html/ \ No newline at end of file diff --git a/hugo.yaml b/hugo.yaml index b45a5bc..c7fd6c3 100644 --- a/hugo.yaml +++ b/hugo.yaml @@ -1,4 +1,4 @@ -baseURL: https://example.org/ +baseURL: https://1970666.xyz/ languageCode: zh-cn title: 魔芋土豆 theme: ["PaperMod"]