diff options
| author | la-ninpre <leobrekalini@gmail.com> | 2022-04-19 00:24:23 +0300 |
|---|---|---|
| committer | la-ninpre <leobrekalini@gmail.com> | 2022-04-19 00:32:37 +0300 |
| commit | 8d962aabf74c42c3afdc38f2f85fa7b06fd04ef0 (patch) | |
| tree | e5054517b940e5c535a4c7282d7faa7b6462e794 /post-receive.example | |
| parent | 9f4b181b36418669462c0300c2e090d0f4547dc8 (diff) | |
| download | aaoth.xyz-8d962aabf74c42c3afdc38f2f85fa7b06fd04ef0.tar.gz aaoth.xyz-8d962aabf74c42c3afdc38f2f85fa7b06fd04ef0.zip | |
reimplement website using shell scripts
major change, i know. now i'm using ssg and rssg by roman zolotarev.
okay, well, not exactly. ssg is modified to generate pages for gemini
too. it's hard to maintain two different things simultaneously.
bye-bye jekyll!
Diffstat (limited to 'post-receive.example')
| -rw-r--r-- | post-receive.example | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/post-receive.example b/post-receive.example index 1368671..84a5b6c 100644 --- a/post-receive.example +++ b/post-receive.example @@ -2,30 +2,20 @@ # example git post-receive hook that i use to autobuild my website on push -# setup paths -export GEM_HOME=$HOME/gems -export PATH=$GEM_HOME/bin:$PATH - # set variables, change example.com to your website repo name GIT_REPO=$HOME/example.com.git TMP_GIT_CLONE=$HOME/tmp/example.com -GEMFILE=$TMP_GIT_CLONE/Gemfile -PUBLIC_WWW=/var/www/htdocs/example.com +AAOTH_ROOT=/var/www/htdocs/example.com +AAOTH_GEMROOT=/var/gemini/example.com + +export AAOTH_ROOT AAOTH_GEMROOT # change branch name to your main deploy branch git clone -b main "$GIT_REPO" "$TMP_GIT_CLONE" # build the site -BUNDLE_GEMFILE=$GEMFILE bundle install -BUNDLE_GEMFILE=$GEMFILE bundle exec jekyll build -s "$TMP_GIT_CLONE" -d "$PUBLIC_WWW" - -# genterate thumbnails -{ - cp "$TMP_GIT_CLONE/visual/thumbs.sh" "$PUBLIC_WWW/visual/thumbs.sh" - cd "$PUBLIC_WWW/visual" - sh thumbs.sh - rm thumbs.sh -} +cd "$TMP_GIT_CLONE" && sh build.sh +# clean up rm -Rf "$TMP_GIT_CLONE" exit |
