From 473f1340da9a618d85ce9b3ea972577610052495 Mon Sep 17 00:00:00 2001 From: kongxiangyiren Date: Wed, 22 May 2024 08:43:07 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.gitea/workflows/youzi.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/youzi.yml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/youzi.yml b/.gitea/workflows/youzi.yml index 56897f8..d5e6755 100644 --- a/.gitea/workflows/youzi.yml +++ b/.gitea/workflows/youzi.yml @@ -4,16 +4,25 @@ on: branches: - main -jobs: - build-and-deploy: +jobs: + build-and-deploy: runs-on: ubuntu-latest steps: - name: Checkout - uses: https://gitea.cn/actions/checkout@v3 + uses: https://gitea.cn/actions/checkout@v4 + - id: tool-cache + uses: https://gitea.com/kongxiangyiren/gitea-tool-cache@v5 + with: + # 只有node支持版本号别名 + node-version: 18 + - uses: https://gitea.cn/actions/setup-node@v4 + with: + # gitea-tool-cache导出 node 具体版本 + node-version: ${{ steps.tool-cache.outputs.node-version }} - name: 缓存 - uses: https://gitea.cn/actions/cache@v3 + uses: https://gitea.cn/actions/cache@v4 id: cache with: path: node_modules @@ -21,9 +30,8 @@ jobs: - name: Install and Build # 下载依赖 打包项目 run: | - corepack enable yarn install - yarn build + yarn build - name: Appleboy uses: https://gitcode.net/weixin_44697517/scp-action@v0.1.4 with: @@ -33,4 +41,4 @@ jobs: password: ${{ secrets.SERVER_PASSWORD }} # 服务器连接密钥 source: './dist/' # 拷贝文件目录 target: ${{ secrets.USER_TARGET }} # 服务器目标目录 - strip_components: 2 \ No newline at end of file + strip_components: 2