Create parse.py #4
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: Update Card JSON File | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - web-ui | |
| jobs: | |
| update-json: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.12' | |
| - name: Run script to update cards.json | |
| run: python parse.py | |
| - name: Commit and push changes | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| git add cards.json | |
| git diff --cached --quiet || (git commit -m "Auto-update Card JSON File" && git push) |