diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 593c064..85c79da 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,6 +31,7 @@ jobs: const { default: createGitTag } = await import('${{ github.workspace }}/scripts/createGitTag.mjs'); await createGitTag(github, context); + - name: Fetch tag if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' run: git fetch --tags @@ -64,3 +65,6 @@ jobs: with: azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }} action: "close" + app_location: "/" + api_location: "" + output_location: "build" diff --git a/scripts/common/git.mjs b/scripts/common/git.mjs index 86516f8..c4a7950 100644 --- a/scripts/common/git.mjs +++ b/scripts/common/git.mjs @@ -66,10 +66,6 @@ export async function getCurrentBranchNameAsync() { } export async function isWorkingDirectoryDirtyAsync() { - try { - await executeCommandAsync('git diff-index --quiet HEAD --'); - return false; - } catch { - return true; - } + const status = await executeCommandAsync('git status --porcelain'); + return status.trim() !== ''; }