Skip to content

Commit f7bfcf5

Browse files
committed
chore: 기존 방식에 develop 브랜치만 추가하도록 다시 변경
1 parent 98cc93b commit f7bfcf5

File tree

2 files changed

+38
-32
lines changed

2 files changed

+38
-32
lines changed

.github/workflows/deploy.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Synchronize to forked repo
2+
3+
on:
4+
push:
5+
branches:
6+
- main # main 브랜치에 push 발생 시 실행
7+
- develop # develop 브랜치에 push 발생 시 실행
8+
9+
jobs:
10+
sync:
11+
name: Sync forked repo
12+
runs-on: ubuntu-latest # GitHub Actions 가상 환경
13+
14+
steps:
15+
- name: Checkout current branch
16+
uses: actions/checkout@v4
17+
with:
18+
token: ${{ secrets.AUTO_ACTIONS }}
19+
fetch-depth: 0
20+
21+
- name: Determine target branch
22+
id: vars
23+
run: |
24+
BRANCH=$(basename "${{ github.ref }}")
25+
echo "TARGET_BRANCH=$BRANCH" >> $GITHUB_ENV
26+
27+
- name: Add remote-url
28+
run: |
29+
git remote add forked-repo https://dewbeeny:${{ secrets.AUTO_ACTIONS }}@github.com/dewbeeny/HomePage-FE
30+
git config user.name dewbeeny
31+
git config user.email ${{ secrets.EMAIL }}
32+
33+
- name: Push changes to forked-repo
34+
run: |
35+
git push -f forked-repo ${{ env.TARGET_BRANCH }}
36+
- name: Clean up
37+
run: |
38+
git remote remove forked-repo

.github/workflows/sync-to-fork.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)