Scheduled calendar build #1366
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: Scheduled calendar build | |
on: | |
schedule: | |
# Runs "At minute 15 past every 24th hour." (see https://crontab.guru): | |
- cron: '15 */24 * * *' | |
# Test running every 20 minutes: | |
# - cron: '*/20 * * * *' | |
jobs: | |
build: | |
name: Scheduled calendar generation and deploy to gh-pages | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Get latest release binary | |
run: wget -q -O tmp.zip https://github.com/mukundbhudia/wembley-events/releases/latest/download/wembley-events_x86_64-unknown-linux-gnu.zip && unzip -o tmp.zip && rm tmp.zip && strip wembley-events | |
- name: Generate Calendar | |
run: | | |
./wembley-events | |
env: | |
CALENDAR_URL: "https://serpapi.com/search.json?engine=google_events&q=Events+in+wembley&location=Wembley%2C+England%2C+United+Kingdom&api_key=" | |
CALENDAR_SAVE_PATH: "output/wembley-events.ics" | |
CALENDAR_JSON_SAVE_PATH: "output/wembley-events.json" | |
SERPAPI_API_KEY: ${{ secrets.SERPAPI_API_KEY }} | |
- name: Deploy to GitHub pages | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: output # The folder the action should deploy. |