Baidu Sitemap Push #70
This file contains hidden or 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
| name: Baidu Sitemap Push | |
| on: | |
| schedule: | |
| - cron: "0 16 * * *" | |
| workflow_dispatch: | |
| inputs: | |
| name: | |
| description: "手动触发推送" | |
| required: false | |
| jobs: | |
| build: | |
| name: Baidu Sitemap Push | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@main | |
| - name: Set Up Python | |
| uses: actions/setup-python@main | |
| with: | |
| python-version: '3.14' | |
| - name: Install Requests | |
| run: pip install requests | |
| - name: Generate Txt | |
| run: python scaffolds/backup/generate.py | |
| - name: Baidu Push | |
| run: curl -H 'Content-Type:text/plain' --data-binary @urls.txt "${{ secrets.BAIDU_TOKEN }}" | |
| - name: Delete Workflow Runs | |
| uses: Mattraks/delete-workflow-runs@main | |
| with: | |
| retain_days: 30 | |
| keep_minimum_runs: 6 |