mirror of
https://github.com/halfwaystudent/douyin-sparkflow.git
synced 2026-09-05 07:27:53 +08:00
Import sanitized project structure and GitHub docs
This commit is contained in:
+41
@@ -0,0 +1,41 @@
|
||||
name: DouYin Spark Flow Schedule Run
|
||||
on:
|
||||
workflow_dispatch: # 允许手动触发
|
||||
schedule: # 定时任务
|
||||
- cron: "0 1 * * *" # 每天 1:00 UTC(对应北京时间 9:00)
|
||||
jobs:
|
||||
run-main:
|
||||
timeout-minutes: 20
|
||||
runs-on: ubuntu-latest
|
||||
environment: user-data
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Test Douyin Accessibility
|
||||
run: |
|
||||
curl -I https://creator.douyin.com/
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
- name: Ensure browsers are installed
|
||||
run: playwright install chromium --with-deps --only-shell
|
||||
- name: Run DouYin Spark Flow
|
||||
env:
|
||||
USER_DATA: ${{ secrets.USER_DATA }}
|
||||
run: python main.py --doTask
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: ${{ !cancelled() }}
|
||||
with:
|
||||
name: run-logs
|
||||
path: logs/
|
||||
workflow-keepalive:
|
||||
if: github.event_name == 'schedule'
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: write
|
||||
steps:
|
||||
- uses: liskin/gh-workflow-keepalive@v1
|
||||
Reference in New Issue
Block a user