Skip to content

Update ICAL Files

Update ICAL Files #48

Workflow file for this run

name: Update Calendar Files
on:
workflow_dispatch:
schedule:
- cron: '0 * * * *' # Adjust the schedule as necessary
jobs:
update-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout gh-pages branch
uses: actions/checkout@v2
with:
ref: gh-pages # Specify to checkout the gh-pages branch
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install dependencies
run: npm install
working-directory: .github/scripts
- name: Run script to update calendar files
run: npm start
working-directory: .github/scripts
env:
ICS_URL: ${{ secrets.ICS_URL }}
- name: Commit and push if there are changes
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
git add ical/calendar.ics ical/calendar.json
git commit -m "Update calendar files" -a || echo "No changes to commit"
git push origin gh-pages