[#180] 📝 리드미 추가 (#181) #45
This file contains hidden or 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: Git Push into Another Repo to Deploy to Vercel | |
| on: | |
| push: | |
| branches: [dev] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install mustache (to update the date) | |
| run: sudo apt update && sudo apt install -y ruby && sudo gem install mustache | |
| - name: Creates output | |
| run: sh ./build.sh | |
| - name: Pushes to Another Repository | |
| id: push_directory | |
| uses: cpina/github-action-push-to-another-repository@main | |
| env: | |
| API_TOKEN_GITHUB: ${{ secrets.AUTH_TOKEN }} | |
| with: | |
| source-directory: '.' | |
| destination-github-username: KingNono1030 | |
| destination-repository-name: frontend_fork | |
| user-email: ${{ secrets.OFFICIAL_ACCOUNT_EMAIL }} | |
| commit-message: ${{ github.event.head_commit.message || 'Auto-deployed from GitHub Actions' }} | |
| target-branch: dev | |
| push-args: --force # 강제 푸시 옵션 추가 | |
| - name: Test Get Variable Exported by Push-to-Another-Repository | |
| run: echo $DESTINATION_CLONED_DIRECTORY |