From f6b306bcebb2637315672b74ed530e71701aa79d Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Wed, 23 Jul 2025 12:39:08 +0800 Subject: [PATCH 1/2] chore: git action to push to main + docs --- .github/workflows/push-to-prod.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/push-to-prod.yml diff --git a/.github/workflows/push-to-prod.yml b/.github/workflows/push-to-prod.yml new file mode 100644 index 000000000..dfde16c68 --- /dev/null +++ b/.github/workflows/push-to-prod.yml @@ -0,0 +1,30 @@ +name: Push to main + docs branches + +on: + workflow_dispatch: + +jobs: + push_changes: + runs-on: ubuntu-latest + steps: + - name: Checkout develop branch + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: false + ref: 'develop' + fetch-depth: 0 + + - name: Generate token + id: generate_token + uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e + with: + app-id: 894214 + private-key: ${{ secrets.THIRDWEB_BOT_PRIVATE_KEY }} + + - name: Push to main + docs branches + env: + GH_TOKEN: ${{ steps.generate_token.outputs.token }} + run: | + git push origin develop:main --force + git push origin develop:docs --force + \ No newline at end of file From 19cf6bac5f84445dca6349d7fc8c61d4f0d59292 Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Wed, 23 Jul 2025 12:40:51 +0800 Subject: [PATCH 2/2] lint --- .github/workflows/push-to-prod.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/push-to-prod.yml b/.github/workflows/push-to-prod.yml index dfde16c68..9aecf42b5 100644 --- a/.github/workflows/push-to-prod.yml +++ b/.github/workflows/push-to-prod.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout develop branch - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: persist-credentials: false ref: 'develop' @@ -27,4 +27,3 @@ jobs: run: | git push origin develop:main --force git push origin develop:docs --force - \ No newline at end of file