Obtain the latest Python weekly newsletters every week #45
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
name: Obtain the latest Python weekly newsletters every week | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 10 * * 0' # on Sunday 18:00 UTC+8 | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: main | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r resources/requirements.txt | |
- name: Obtain weekly newsletters | |
run: | | |
python resources/weekly_collection.py | |
env: | |
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} | |
TG_CHAT_ID: ${{ secrets.TG_CHAT_ID }} |