Skip to content

Commit

Permalink
chore: yml파일 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
lurgi committed Sep 20, 2024
1 parent 873593b commit 30d3da9
Showing 1 changed file with 24 additions and 5 deletions.
29 changes: 24 additions & 5 deletions .github/workflows/build-clone.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,37 @@
name: Clone Repository on Build Branch Push
name: Push Build Files to Wanna-Woowa-Blog Main

on:
push:
branches:
- build
- build # build 브랜치에 푸시될 때 트리거

jobs:
clone_repo:
deploy_to_blog:
runs-on: ubuntu-latest

steps:
- name: Checkout the repository
# 1. 현재 A 레포지토리의 build 브랜치 체크아웃
- name: Checkout the build branch
uses: actions/checkout@v3
with:
ref: build # build 브랜치 체크아웃

- name: Clone the repository to personal account
# 2. wanna-woowa-blog 레포지토리 클론
- 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
# 3. build 파일들을 wanna-woowa-blog로 복사
- name: Copy build files to wanna-woowa-blog
run: |
cp -r ../build/* ./ # build 폴더에서 모든 파일을 복사
# 4. 변경된 파일 커밋 및 푸시
- name: Commit and push changes to wanna-woowa-blog main
run: |
git config --global user.email "[email protected]"
git config --global user.name "your-username"
git add .
git commit -m "Deploying build files from build branch"
git push https://${{ secrets.LURGI_PERSONAL_ACCESS_TOKEN }}@github.com/lurgi/wanna-woowa-blog.git main

0 comments on commit 30d3da9

Please sign in to comment.