From 9adbbde67f80f8d3ec4975458ddd973de77a6ace Mon Sep 17 00:00:00 2001 From: Abu Masyail <20874779+sooluh@users.noreply.github.com> Date: Wed, 22 May 2024 15:28:04 +0700 Subject: [PATCH] fix: rewrite status only on gh actions --- .github/workflows/build-merge.yml | 4 ++-- .github/workflows/update-status.yml | 2 +- src/build.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-merge.yml b/.github/workflows/build-merge.yml index d8e151d..0261b4c 100644 --- a/.github/workflows/build-merge.yml +++ b/.github/workflows/build-merge.yml @@ -22,8 +22,8 @@ jobs: - name: Install dependencies run: bun install - - name: Build Markdown (Merged Flag) - run: bun start --merged + - name: Build Markdown + run: bun start - name: Commit & Push Changes run: | diff --git a/.github/workflows/update-status.yml b/.github/workflows/update-status.yml index 6534d2a..7c0295f 100644 --- a/.github/workflows/update-status.yml +++ b/.github/workflows/update-status.yml @@ -23,7 +23,7 @@ jobs: run: bun install - name: Build Markdown - run: bun start + run: bun start --rewrite - name: Commit & Push Changes run: | diff --git a/src/build.ts b/src/build.ts index 0137133..bd99134 100644 --- a/src/build.ts +++ b/src/build.ts @@ -17,7 +17,7 @@ for await (const file of await getFiles()) { // sort alphabetically json.apis.sort((a, b) => a.apiName.localeCompare(b.apiName)) - if (Bun.argv[2] !== '--merged') { + if (Bun.argv[2] === '--rewrite') { for (let i = 0; i < json.apis.length; i++) { const api = json.apis[i] const previous = api.status