From c86e8e69bd8ef6fa18a0336fb9d1b3512912257c Mon Sep 17 00:00:00 2001 From: FliPPeDround <734243792@qq.com> Date: Mon, 24 Jun 2024 11:13:25 +0800 Subject: [PATCH] ci: fix cwd --- .github/workflows/ci.yml | 4 ++-- .github/workflows/release.yml | 4 ---- scripts/dev.cjs | 1 + 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7931234..c38f694 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -151,7 +151,7 @@ jobs: - name: dev小程序项目 working-directory: ../sample-project - run: node scripts/dev.cjs + run: node ../scripts/dev.cjs - name: 打包小程序项目 working-directory: ../sample-project @@ -211,7 +211,7 @@ jobs: - name: dev小程序项目 working-directory: ../sample-project - run: node scripts/dev.cjs + run: node ../scripts/dev.cjs - name: 打包小程序项目 working-directory: ../sample-project diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6d6d0b6..3ab1bf9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,10 +4,6 @@ on: push: tags: - 'v*' - workflow_run: - workflows: [CI] - types: - - completed jobs: diff --git a/scripts/dev.cjs b/scripts/dev.cjs index 67268d6..dcc1ff0 100644 --- a/scripts/dev.cjs +++ b/scripts/dev.cjs @@ -7,6 +7,7 @@ const process = require('node:process') const devProcess = spawn('pnpm', ['dev:mp-weixin'], { stdio: 'inherit', shell: true, + cwd: path.join(__dirname, '../sample-project'), }) // 检查文件是否存在