Testing Monthly Data Update #9
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: Testing Monthly Data Update | |
on: | |
schedule: | |
- cron: "0 21 1 * *" # Runs at 00:00 (TLV Time - UTC+3) on the first day of every month | |
workflow_dispatch: | |
jobs: | |
update_data: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Run script | |
run: python haaretz_scrape.py | |
- name: Commit and push changes | |
env: | |
# PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "ChefAharoni" | |
git add data/* | |
git commit -m "Auto updated magazines URLs via Script on $(date)" || exit 0 | |
git push | |
# git remote set-url origin https://ChefAharoni:${PERSONAL_ACCESS_TOKEN}@github.com/ChefAharoni/HaaretzMusafim.git |