From 0b8c8f154b7e10d04600b018bfdb9d1e9442e878 Mon Sep 17 00:00:00 2001 From: Yutaro Sakamoto Date: Wed, 2 Oct 2024 00:59:02 +0900 Subject: [PATCH] [Fix]: specify working directories in workflow files --- .github/workflows/deploy.yml | 1 + .github/workflows/post-cdk-diff.yml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1a88a9d..8fa536a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -31,6 +31,7 @@ jobs: cache-dependency-path: "package-lock.json" - name: Deploy + working-directory: ./infrastructure run: | npm ci npx cdk deploy --require-approval never -O output.js diff --git a/.github/workflows/post-cdk-diff.yml b/.github/workflows/post-cdk-diff.yml index b610526..0d2114f 100644 --- a/.github/workflows/post-cdk-diff.yml +++ b/.github/workflows/post-cdk-diff.yml @@ -27,6 +27,7 @@ jobs: uses: actions/checkout@v4 - name: Run `cdk diff` + working-directory: ./infrastructure run: | npm install echo '# cdk diffの結果' > cdk-diff-result.txt @@ -34,6 +35,7 @@ jobs: - name: Post a comment uses: actions/github-script@v7.0.1 + working-directory: ./infrastructure with: script: | const fs = require('fs')