Skip to content

Commit

Permalink
feat(workflow): Add sync-feature-branch.yml to auto deploy feature br…
Browse files Browse the repository at this point in the history
…anch
  • Loading branch information
dengfuping committed Mar 8, 2024
1 parent 3d6d168 commit 41abf7a
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: CI

on: [push, pull_request]
on: [pull_request]

jobs:
build:
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/sync-feature-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Sync Feature Branch

on:
# Runs on pushes targeting the default branch
push:
branches: ['feature']

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
if: github.repository == 'oceanbase/oceanbase-design'
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [16.x]
os: [ubuntu-latest]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: feature
# Sync `feature` branch from oceanbase/oceanbase-design to dengfuping/oceanbase-design
# `feature` branch will be deployed auto in Vercel after sync success
- name: Sync feature branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git push https://dengfuping:[email protected]/dengfuping/oceanbase-design feature:feature

0 comments on commit 41abf7a

Please sign in to comment.