semaine de reucp typos, examens janvier 2024 #81
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: deploy iCalendar files | |
on: | |
push: | |
branches: [ main ] | |
workflow_dispatch: | |
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: '14' | |
- uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.HEBESI_HE2BWEB }} | |
- name: generate config file | |
run: | | |
# the redirection avoids progress meter | |
git clone --depth 1 [email protected]:HEB-ESI/he2besi-web 2>&1 | cat | |
mkdir -p build/config | |
node scripts/generate-calendars-json.js ical/2023-2024/ he2besi-web/jekyllsrc/_data/personnels.json >build/calendars.json | |
npm install | |
node scripts/getEvents.mjs -d ical/2023-2024/groupes/ >build/events.json | |
{ printf '<p>Last update: <time>%s</time></p>' "$(date)"; } >build/index.html | |
mv ical -t build | |
- name: Deploy | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: build # The folder the action should deploy. |