-
Notifications
You must be signed in to change notification settings - Fork 79
Expand file tree
/
Copy pathdeploy.sh
More file actions
35 lines (26 loc) · 828 Bytes
/
deploy.sh
File metadata and controls
35 lines (26 loc) · 828 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# #!/usr/bin/env bash
# Break build on error, prevents websites going offline in case of pelican errors
set -e
echo "Starting Pelican build of $WEBSITE"
cd $WEBSITE
# Build pelican website for deployment
pelican content -s publishconf.py
# Copy files for github
cp README.md output/README.md
if [[ -e .nojekyll ]]; then
cp .nojekyll output/.nojekyll
fi
if [[ -e netlify.toml ]]; then
cp netlify.toml output/netlify.toml
fi
if [[ -e robots.txt ]]; then
cp robots.txt output/robots.txt
fi
# Remove individual calendar events
# These pages are generated by Pelican but we don't want them displayed on the website
# as individual files. Only the calendar overview has to be shown.
if [[ -d output/calendar ]]; then
(cd output/calendar && ls | grep -v index.html | xargs rm -rf)
fi
# Go back to root directory
cd ..