generated from shuding/nextra-docs-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
13 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,28 +3,37 @@ name: Build Branch Push to Wanna-Woowa-Blog Main | |
on: | ||
push: | ||
branches: | ||
- build | ||
- build # build 브랜치에 푸시될 때 트리거 | ||
|
||
jobs: | ||
push_to_wanna_woowa_blog: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# 1. build 브랜치를 체크아웃 | ||
- name: Checkout the build branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: build | ||
ref: build # build 브랜치 체크아웃 | ||
|
||
# 2. wanna-woowa-blog 레포지토리 클론 및 main 브랜치 체크아웃 | ||
- name: Clone the wanna-woowa-blog repository | ||
run: | | ||
git clone https://${{ secrets.LURGI_PERSONAL_ACCESS_TOKEN }}@github.com/lurgi/wanna-woowa-blog.git | ||
cd wanna-woowa-blog | ||
git checkout -b main || git checkout main | ||
# main 브랜치가 없으면 생성하고, 있으면 체크아웃 | ||
if git show-ref --quiet refs/heads/main; then | ||
git checkout main | ||
else | ||
git checkout -b main | ||
fi | ||
# 3. A 레포지토리의 파일을 Wanna-Woowa-Blog로 복사 | ||
- name: Copy files to Wanna-Woowa-Blog | ||
run: | | ||
rsync -av --exclude=".git" ../ ./ | ||
rsync -av --exclude=".git" ../ ./ # A 레포지토리의 모든 파일 복사 (output을 원하지 않으면 삭제 가능) | ||
# 4. 변경된 파일 커밋 및 Wanna-Woowa-Blog main 브랜치에 푸시 | ||
- name: Commit and push to Wanna-Woowa-Blog main | ||
run: | | ||
git config --global user.email "[email protected]" | ||
|