Feat: 더보기 페이지 구현 #184
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
name: Hyuil build | |
on: [push, pull_request] | |
jobs: | |
# 1. Build and Test Job - 모든 브랜치에서 수행 | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [ 20.x ] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: npm install | |
- name: Build project | |
run: npm run build | |
# 2. Push to Another Repository Job - 메인 브랜치에서만 수행 | |
push-to-another-repo: | |
runs-on: ubuntu-latest | |
needs: build # 빌드가 완료된 후 실행 | |
if: github.ref == 'refs/heads/main' # 메인 브랜치일 때만 실행 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Create output | |
run: sh ./build.sh | |
- name: Pushes to another repository | |
id: push_directiry | |
uses: cpina/github-action-push-to-another-repository@main | |
env: | |
API_TOKEN_GITHUB: ${{secrets.AUTO_ACTIONS}} | |
with: | |
source-directory: 'output' | |
destination-github-username: seo0o519 | |
destination-repository-name: HYUIL | |
user-email: ${{ secrets.EMAIL }} | |
commit-message: ${{ github.event.commits[0].message }} | |
target-branch: main | |
- name: Test get variable exported by push-to-another-repository | |
run: echo $DESTINATION_CLONED_DIRECTORY |