Skip to content

Auto Grab Kuramanime Token #2

Auto Grab Kuramanime Token

Auto Grab Kuramanime Token #2

Workflow file for this run

name: Auto Grab Kuramanime Token
on:
schedule:
- cron: '0 */3 * * *'
workflow_dispatch:
jobs:
grab-token:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install Puppeteer & Stealth
run: |
npm init -y
npm install puppeteer puppeteer-extra puppeteer-extra-plugin-stealth
- name: Run Scraper
run: node scraper.js
# Upload screenshot artifact if node scraper.js FAILS (exit code 1)
- name: Upload Error Screenshot
if: failure()
uses: actions/upload-artifact@v4
with:
name: debug-screenshot
path: error.png
- name: Commit & Push Token to Repo
if: success()
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add kurama_token.txt
git commit -m "Auto-update Kuramanime token" || echo "Token is still the same"
git push