Skip to content

Get Food Schedule 🍔 #475

Get Food Schedule 🍔

Get Food Schedule 🍔 #475

name: Get Food Schedule 🍔
on:
workflow_dispatch:
schedule:
- cron: "0 1 * * 1-5"
env: # Or as an environment variable
CLIENT_ID: ${{ secrets.SKOLMATEN_CLIENT_ID }}
jobs:
refresh-feed:
runs-on: ubuntu-latest
steps:
- name: Fetch API Data 📦
uses: JamesIves/fetch-api-data-action@v2
with:
endpoint: https://www.skolmaten.se/api/3/menu/?school=6527553372160000
configuration: '{ "method": "GET", "headers": {"client": "${{ secrets.SKOLMATEN_CLIENT_ID }}"} }'
- name: Build and Deploy 🚀
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: main # Pushes the updates to the master branch.
FOLDER: fetch-api-data-action # The location of the data.json file saved by the Fetch API Data action.
TARGET_FOLDER: food-schedule # Saves the data into the 'data' directory on the master branch.