Repository navigation
Scrape AyumiLove Champions #3
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: Scrape AyumiLove Champions | |
| on: | |
| schedule: | |
| - cron: '15 4 * * *' # Daily at 04:15 UTC (off-peak, after daily patches) | |
| workflow_dispatch: # 1-tap manual run anytime from GitHub Mobile app | |
| jobs: | |
| scrape: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Run Scraper & Autonomous Gist Sync | |
| env: | |
| GIST_TOKEN: ${{ secrets.GIST_TOKEN }} | |
| run: | | |
| SCRIPT_PATH=$(find . -name "scrape_ayumilove.py" -not -path "*/.*" | head -n 1) | |
| if [ -n "$SCRIPT_PATH" ]; then | |
| echo "Running: $SCRIPT_PATH" | |
| python3 "$SCRIPT_PATH" | |
| else | |
| echo "Error: scrape_ayumilove.py not found" | |
| exit 1 | |
| fi | |
| - name: Commit & Push if Changed | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| git add -A | |
| git diff --staged --quiet || (git commit -m "chore(data): auto-update champions from AyumiLove" && git push) |