From 1f5b084f3529bd92343345688af28362991f234e Mon Sep 17 00:00:00 2001 From: mozzie Date: Tue, 4 Jun 2024 13:42:24 +0800 Subject: [PATCH] 1 --- .gitea/workflows/build.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 4e004979..253910f7 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -8,14 +8,16 @@ on: jobs: build: runs-on: ubuntu-latest - container: - image: node:18 - options: --volume /www/wwwroot/caddy/html/:/public steps: - name: Checkout repository uses: actions/checkout@v2 + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: '18' # or specify the version you need + - name: Install pnpm run: npm i -g pnpm hexo @@ -29,4 +31,10 @@ jobs: run: hexo g - name: build algolia search index - run: pnpm run search \ No newline at end of file + run: pnpm run search + + - name: Copy files to remote server + run: | + scp -r public/* root@maxshader.com:/www/wwwroot/caddy/html/blog-hexo + env: + SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} \ No newline at end of file