Skip to content

Commit

Permalink
yml
Browse files Browse the repository at this point in the history
  • Loading branch information
lurgi committed Sep 20, 2024
1 parent 0365131 commit 87265b5
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]"
Expand Down

0 comments on commit 87265b5

Please sign in to comment.