Skip to content

Generate ics files

Generate ics files #5

Workflow file for this run

name: Generate ics files
on:
schedule:
- cron: '*/7 * * * *'
jobs:
run-scripts:
runs-on: ubuntu-latest
environment: OhEarningCal
steps:
- uses: actions/checkout@v4
- name: Reset local changes
run: |
git fetch origin main
git reset --hard origin/main
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install dependencies
run: npm install
- name: Run genAllIcs script
run: node ./api/github_gen.js
env:
SHOULD_GEN_SELECTED: ${{ vars.SHOULD_GEN_SELECTED }}
SHOULD_GEN_ALL: ${{ vars.SHOULD_GEN_ALL }}
- name: Commit files
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add -A
git commit -m "Auto generated ics files" -a || echo "No changes to commit"
git push --force