Skip to content

Update ICAL Files #1280

Update ICAL Files

Update ICAL Files #1280

Workflow file for this run

name: Update ICAL Files
on:
workflow_dispatch:
schedule:
- cron: '0 12 * * *' # Optionally, schedule to run daily
permissions:
contents: write
concurrency:
group: gh-pages-publish
cancel-in-progress: false
jobs:
update-ical:
name: Get ICS and Process
runs-on: ubuntu-latest
steps:
- name: Checkout main branch
uses: actions/checkout@v6
with:
ref: main # Specify the branch to checkout
path: main
- name: Checkout gh-pages branch
uses: actions/checkout@v6
with:
ref: gh-pages # Specify the branch to checkout
path: gh-pages
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: '24' # Specify your Node.js version
cache: npm
cache-dependency-path: main/.github/scripts/package-lock.json
- name: Install dependencies
run: npm ci # Assuming your script needs npm packages
working-directory: ./main/.github/scripts
- name: Update ICAL File
run: node index.js --action # Run your specific script
working-directory: ./main/.github/scripts
- name: Commit and push if there are changes
run: |
cd gh-pages
git config --global user.email "action@github.com"
git config --global user.name "GitHub Action"
git add calendar.ics ical/calendar.json
git commit -m "Update calendar files" -a || echo "No changes to commit"
git push origin gh-pages