Add deploy and git perm fix to Makefile
authorDylan Lloyd <dylan@disinclined.org>
Sat, 11 Feb 2023 00:54:17 +0000 (19:54 -0500)
committerDylan Lloyd <dylan@disinclined.org>
Sat, 11 Feb 2023 00:54:17 +0000 (19:54 -0500)
.gitignore
Makefile

index 920a31d..57fc3f9 100644 (file)
@@ -4,3 +4,4 @@ _site
 .jekyll-metadata
 vendor
 disinclined.org
+disinclined.org.tgz
index 5c58f53..04f9f5e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,25 @@
 default: site
 
-build site: _site
+hostname = 69.164.210.222
+sitename = disinclined.org
+
+build site:
        git submodule update
        cp ~/src/resume/resume.{pdf,html} .
-       bundle exec jekyll build -d disinclined.org --trace
+       bundle exec jekyll build -d $(sitename) --trace
 
 serve:
        bundle exec jekyll serve --trace --verbose --livereload
 
 upgrade:
        bundle update
+
+deploy:
+       tar -czf $(sitename).tgz $(sitename)
+       scp $(sitename).tgz $(hostname):
+       ssh -t $(hostname) tar -xf $(sitename).tgz
+       ssh -t $(hostname) sudo rsync -a ~dylan/$(sitename) /srv/http/
+       rm $(sitename).tgz
+
+fix-git-permissions:
+       ssh -t $(hostname) sudo -u git /var/lib/gitolite3/update-permissions