-
Notifications
You must be signed in to change notification settings - Fork 24
43 lines (36 loc) · 1.18 KB
/
Copy pathupdate-token.yml
File metadata and controls
43 lines (36 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Auto Grab Kuramanime Token
on:
schedule:
- cron: '0 */3 * * *'
workflow_dispatch:
jobs:
grab-token:
runs-on: windows-latest # Changed to Windows to bypass Cloudflare IP blocks
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
- 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()
shell: bash
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