Hi Bex,
I'm not exactly sure what are you looking for, but here is what I'm using on my server to grab several projects, and build them if there are new commits.
Some of the websites are static or php, those are just pulled, while others are jekyll which has to be built. Similarly you could call any other build thing instead of jekyll, copy it somewhere, etc...
19 update_rhea ()
20 {
21 PROJECT="/home/rhea/www/jekyll-rhea"
22 update_jekyll
23 }
24
25 update_jekyll ()
26 {
27 git -C $PROJECT fetch origin
28 if [[ "$(git -C $PROJECT log HEAD..origin/master --oneline)" != "" ]]; then
29 git -C $PROJECT merge origin/master & jekyll build --source $PROJECT --destination $PROJECT/_site
30 fi
31 }
32
33
34 while true
35 do
36
37 update_esm
38 update_oproti
39 update_rhea
40 update_spytec
41 update_magazine
42 update_botwinder