Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update cicd #23

Merged
merged 2 commits into from
Oct 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading