From a0b505e8a047f20645bada07024472fadbe90f60 Mon Sep 17 00:00:00 2001 From: wenty22 Date: Mon, 21 Oct 2024 14:46:32 +0800 Subject: [PATCH] chore: Update cicd --- .github/workflows/gh-pages-cicd.yaml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/gh-pages-cicd.yaml b/.github/workflows/gh-pages-cicd.yaml index ede47e28..74ef4234 100644 --- a/.github/workflows/gh-pages-cicd.yaml +++ b/.github/workflows/gh-pages-cicd.yaml @@ -4,6 +4,11 @@ on: issue_comment: types: [created] +env: + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + SERVER_ENDPOINT: ${{ vars.SERVER_ENDPOINT }} + WALLET_CONNECT_PROJECT_ID: ${{ vars.WALLET_CONNECT_PROJECT_ID }} + jobs: cicd: if: github.repository == 'bnb-chain/canonical-bridge' && contains(github.event.comment.body, '/qa-deploy:canonical-bridge-ui') @@ -14,6 +19,8 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + ref: ${{ env.BRANCH_NAME}} + token: ${{ secrets.GITHUB_TOKEN }} - uses: ./.github/actions/setup @@ -31,8 +38,8 @@ jobs: APP_NAME: canonical-bridge BASE_PATH: /canonical-bridge ASSET_PREFIX: /canonical-bridge - SERVER_ENDPOINT: ${{ vars.SERVER_ENDPOINT }} - WALLET_CONNECT_PROJECT_ID: ${{ vars.WALLET_CONNECT_PROJECT_ID }} + SERVER_ENDPOINT: ${{ env.SERVER_ENDPOINT }} + WALLET_CONNECT_PROJECT_ID: ${{ env.WALLET_CONNECT_PROJECT_ID }} - name: Install & build shell: bash @@ -49,11 +56,12 @@ jobs: # force: true - name: Pushes to another repository - uses: dmnemec/copy_file_to_another_repo_action@main + uses: cpina/github-action-push-to-another-repository@main env: API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} with: - source_file: './apps/canonical-bridge-ui/dist' - destination_repo: 'canonical-bridge' - user_name: 'wenty22' - user_email: 'github-actions[bot]@users.noreply.github.com' + source-directory: './apps/canonical-bridge-ui/dist' + destination-github-username: 'wenty22' + destination-repository-name: 'canonical-bridge' + user-email: github-actions[bot]@users.noreply.github.com + target-branch: main