generated from rensetsu/core.scraper.template
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (44 loc) · 1.18 KB
/
scrape.yml
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
44
name: "Scrape platform"
on:
workflow_dispatch:
push:
paths:
- "xingxi/*"
schedule:
- cron: "0 1 * * 2"
permissions:
contents: write
jobs:
Scrape:
name: "Scrape platform and convert as Media object"
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: "Load secrets, if any"
uses: oNaiPs/secrets-to-env-action@v1
with:
secrets: ${{ toJson(secrets) }}
- name: "Setup python"
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"
- name: "Install dependencies"
run: pip install -U -r requirements.txt
- name: "Run scraper"
shell: pwsh
run: |
try {
python3 xingxi
$date = Get-Date -Format "yyyy-MM-dd'T'HH:mm:sszzzz"
git config --local user.email "[email protected]"
git config --local user.name "Rensetsu[bot]"
git add .
git commit -m "Scrape data, $date update"
git push
}
catch {
"Failed to commit, check logs!"
exit 1
}