Skip to content

Commit e620393

Browse files
committed
Add logs for github action
1 parent 335d336 commit e620393

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

.github/workflows/update.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ jobs:
2424
- name: Run scraper
2525
run: node index.js
2626

27+
- name: Upload debug files
28+
if: always()
29+
uses: actions/upload-artifact@v4
30+
with:
31+
name: debug-artifacts
32+
path: |
33+
debug.html
34+
screenshot.png
35+
2736
- name: Move RSS to docs
2837
run: |
2938
mkdir -p docs
@@ -37,4 +46,5 @@ jobs:
3746
git config user.email 'github-actions[bot]@users.noreply.github.com'
3847
git add docs/index.xml
3948
git diff --cached --quiet || git commit -m "Update RSS feed"
40-
git push https://x-access-token:${GH_PAT}@github.com/${{ github.repository }}.git HEAD:master
49+
git push "https://x-access-token:${GH_PAT}@github.com/${{ github.repository }}.git" HEAD:master
50+

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ const URL = 'https://apkpure.com/android-device-policy/com.google.android.apps.w
5151
const fs = await import('fs/promises');
5252
const html = await page.content();
5353
await fs.mkdir('docs', { recursive: true });
54-
await fs.writeFile('docs/debug.html', html);
55-
await page.screenshot({ path: 'docs/screenshot.png', fullPage: true });
54+
await fs.writeFile('debug.html', html);
55+
await page.screenshot({ path: 'screenshot.png', fullPage: true });
5656

5757
console.log('📝 Saved debug.html and screenshot.png to docs/');
5858
}
@@ -61,7 +61,7 @@ const URL = 'https://apkpure.com/android-device-policy/com.google.android.apps.w
6161
} catch (e) {
6262
console.error('❌ Page load failed:', e);
6363
const errorHtml = await page.content();
64-
await page.screenshot({ path: 'docs/screenshot.png', fullPage: true });
64+
await page.screenshot({ path: 'screenshot.png', fullPage: true });
6565

6666
const fs = await import('fs/promises');
6767
await fs.mkdir('docs', { recursive: true });

0 commit comments

Comments
 (0)