Skip to content

Update ics files

Update ics files #101

Workflow file for this run

name: deploy iCalendar files
on:
push:
branches: [ main ]
workflow_dispatch:
env:
icaldir: ical
HORAIRES_SANS_ACRONYMES: ${{ vars.HORAIRES_SANS_ACRONYMES }}
jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.HEBESI_HE2BWEB }}
- name: generate config file
run: |
mkdir -p build/config
npm install
node scripts/getEvents.mjs -d export-cours/ >build/events.json
mkdir -p "$icaldir"/{cours,groupes,profs,salles}
node scripts/generate-ics.mjs "$icaldir"/ build/events.json build/calendars.json
{ printf '<p>Last update: <time>%s</time></p>' "$(date)"; } >build/index.html
mv ical -t build
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages # The branch the action should deploy to.
folder: build # The folder the action should deploy.