Skip to content

Update Google Calendar Basket Calendar as JSON #709

Update Google Calendar Basket Calendar as JSON

Update Google Calendar Basket Calendar as JSON #709

name: Update Google Calendar Basket Calendar as JSON
on:
schedule:
- cron: '* 6 * * *' #
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
# Default to bash
defaults:
run:
shell: bash
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
pages: write
id-token: write
jobs:
update-calendar:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests ics pytz
- name: Run script
run: |
python update_basket_calendar_json.py
# Commit all changed files back to the repository
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Apply basket calendar json changes
deploy:
needs: update-calendar
uses: ./.github/workflows/reusable-hugo-workflow.yml