summaryrefslogtreecommitdiff
path: root/provider/posts/blog/git-deploy.md
diff options
context:
space:
mode:
Diffstat (limited to 'provider/posts/blog/git-deploy.md')
-rw-r--r--provider/posts/blog/git-deploy.md33
1 files changed, 18 insertions, 15 deletions
diff --git a/provider/posts/blog/git-deploy.md b/provider/posts/blog/git-deploy.md
index af4d29b..ddda12f 100644
--- a/provider/posts/blog/git-deploy.md
+++ b/provider/posts/blog/git-deploy.md
@@ -30,21 +30,20 @@ done
30 30
31$touchedMaster || exit 0 31$touchedMaster || exit 0
32 32
33exec &>(logger --id=$$ -p daemon.info -t dirty-haskell) 33{
34 34 tmpDir=$(mktemp -d)
35tmpDir=$(mktemp -d) 35 delTmpDir() {
36delTmpDir() { 36 cd /
37 cd / 37 rm -rf ${tmpDir}
38 rm -rvf ${tmpDir} 38 }
39} 39
40 40 trap delTmpDir EXIT
41trap delTmpDir EXIT 41
42 42 git clone --branch master --depth 1 --single-branch file://$(pwd) ${tmpDir}
43git clone --branch master --depth 1 --single-branch . ${tmpDir} 43
44 44 cd ${tmpDir}
45cd ${tmpDir} 45 nix-shell --run "dirty-haskell build && dirty-haskell deploy"
46nix-shell --run "dirty-haskell build" 46} 2>&1 | stdbuf -o 0 tr '\r' '\n' | logger --id=$$ -p daemon.info -t dirty-haskell
47nix-shell --run "dirty-haskell deploy"
48~~~ 47~~~
49 48
50The script checks if the master branch was moved to a new commit or otherwise 49The script checks if the master branch was moved to a new commit or otherwise
@@ -52,6 +51,10 @@ touched and, if so, clones a copy of the repo to a temporary directory and runs
52hakyll´s deploy command in it, which is set to rsync the compiled version to a 51hakyll´s deploy command in it, which is set to rsync the compiled version to a
53folder where it´ll be picked up by nginx. 52folder where it´ll be picked up by nginx.
54 53
54## Update ##
55
56It works.
57
55[hakyll]: https://jaspervdj.be/hakyll/ 58[hakyll]: https://jaspervdj.be/hakyll/
56[rsync]: https://git.samba.org/rsync.git 59[rsync]: https://git.samba.org/rsync.git
57[gitolite]: http://gitolite.com 60[gitolite]: http://gitolite.com