Update News and Agenda #188
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: Update News and Agenda | |
on: | |
schedule: | |
- cron: '0 0 * * *' #'0 0 * * 1,4' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo content | |
uses: actions/checkout@v3 | |
- name: setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: install python packages | |
run: | | |
python -m pip install --upgrade pip | |
pip install --quiet gspread pandas oauth2client | |
pip install pyarrow | |
- name: execute py script | |
env: | |
GOOGLE_SHEET_ID: 1WKRWIkQ5qqr5caCEl5yaeHHuzDv_yF0fGpQs9dvBTgk | |
API_KEY: ${{ secrets.GOOGLE_SHEETS_API_KEY }} | |
GOOGLE_SHEETS_CREDS: ${{ secrets.GOOGLE_SHEETS_CREDS }} | |
run: python news_and_events_update.py | |
- name: configure git | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "ValentinaPasqual" | |
- name: fetch latest changes from main | |
run: | | |
git fetch origin main | |
git merge origin/main || echo "No changes to merge." | |
- name: commit files | |
run: | | |
git add -A | |
git diff-index --quiet HEAD || (git commit -a -m "updated logs" --allow-empty) | |
- name: push changes | |
uses: ad-m/[email protected] | |
with: | |
github_token: ${{ secrets.BOLDH_TOKEN }} | |
branch: main |