Skip to content

Commit

Permalink
Merge pull request #23 from bnb-chain/cicd
Browse files Browse the repository at this point in the history
chore: Update cicd
  • Loading branch information
Halibao-Lala authored Oct 21, 2024
2 parents a18d127 + 01ce65a commit 2ba66f7
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/gh-pages-cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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

Expand All @@ -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
Expand All @@ -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: 'wenty22/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

0 comments on commit 2ba66f7

Please sign in to comment.