workbook 자동화 #16
  
    
      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: Python application | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # ✅ Push 권한을 위해 필요 | |
| steps: | |
| - name: Checkout the repository | |
| uses: actions/checkout@v2 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} # ✅ 자동 제공 토큰 사용 | |
| - name: Set up Python 3.9 | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: 3.9 | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install requests | |
| - name: Run code | |
| run: | | |
| cd workbook | |
| python actions.py | |
| - name: Commit and Push Changes | |
| run: | | |
| git config user.name github-actions | |
| git config user.email [email protected] | |
| git add workbook/ | |
| git commit -m "Auto-generate workbook for branch ${{ github.ref_name }}" || echo "No changes to commit" | |
| git push origin HEAD |