test action and parse

This commit is contained in:
Ghlerrix
2023-08-07 14:51:20 +08:00
parent 70cc96d8f1
commit 770382afb5
2 changed files with 40 additions and 0 deletions

29
.github/workflows/baidupush.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
## 利用GitHub Actions每天定时给百度推送链接提高收录率 ##
name: baiduPush
# 两种触发方式一、push代码二、每天国际标准时间23点北京时间+8即早上7点运行
on:
push:
# schedule:
# - cron: '0 23 * * *' # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows#scheduled-events-schedule
on:
schedule:
- cron: '*/5 * * * *' # 每5分钟一次测试用
jobs:
bot:
runs-on: ubuntu-latest # 运行环境为最新版的Ubuntu
steps:
- name: 'Checkout codes' # 步骤一,获取仓库代码
uses: actions/checkout@v2
# - name: 'Run baiduPush' # 步骤二执行sh命令文件
# run: npm install && npm run baiduPush # 运行目录是仓库根目录
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: parse sitemap
run: python baidupush.py