每日新闻定时推送 #88
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: 每日新闻定时推送 | |
on: | |
schedule: # 每日定时推送新闻 | |
- cron: "5 20 * * *" # 分 时 日 月 星期 | |
jobs: | |
GLaDOS-CheckIn: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 拉取代码 | |
uses: actions/checkout@v3 | |
- name: 准备Python 3.10 # Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: 安装Python依赖 | |
run: | | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: 开始推送 | |
env: | |
token: ${{ secrets.TOKEN }} # token | |
run: | | |
python main.py |