Pull Google Calendar Events #548
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: Pull Google Calendar Events | |
on: | |
schedule: | |
- cron: '0 14 * * *' # runs every day at midnight | |
push: | |
branches: ["google-api-backend"] | |
workflow_dispatch: | |
jobs: | |
pull_events: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo content | |
uses: actions/checkout@v3 # checkout the repository content to github runner. | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install Dependencies | |
run: pip install -r requirements.txt | |
- name: Run Git Pull | |
run: "git pull --rebase" | |
- name: Run Script | |
env: | |
API_KEY: ${{ secrets.GOOGLE_CALENDAR_API_KEY }} | |
run: python pull-events.py | |
- name: Commit Files | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: Update google calendar data |