Ensure all.ics is copied to public/ after regeneration

This commit is contained in:
Daniel Molkentin 2018-08-16 23:22:24 +02:00
parent 18c0af1b2f
commit 1731cbf1e4
2 changed files with 2 additions and 0 deletions

View file

@ -35,6 +35,7 @@ build_calendar:
- apk --no-cache update - apk --no-cache update
- pip install -r requirements.txt - pip install -r requirements.txt
- python tools/merge_cals.py - python tools/merge_cals.py
- cp static/all.ics public/all.ics
- upcoming="$(python tools/gen_upcoming.py static/all.ics 14 5|tr '\n' ' ')" && sed -i "s#CALENDAR#$upcoming#g" public/index.html - upcoming="$(python tools/gen_upcoming.py static/all.ics 14 5|tr '\n' ' ')" && sed -i "s#CALENDAR#$upcoming#g" public/index.html
deploy_staging: deploy_staging:

View file

@ -3,4 +3,5 @@
hugo hugo
tools/merge_cals.py tools/merge_cals.py
upcoming="$(tools/gen_upcoming.py static/all.ics 14 5|tr '\n' ' ')" upcoming="$(tools/gen_upcoming.py static/all.ics 14 5|tr '\n' ' ')"
cp static/all.ics public/all.ics
sed -i "s#CALENDAR#$upcoming#g" public/index.html sed -i "s#CALENDAR#$upcoming#g" public/index.html