repos

isaacbythewood.com-nextjs

mirror archived upstream

Animation-heavy personal portfolio on Next.js: a custom cursor, a page-transition loader, and canvas backgrounds.

canvas-animationscss-modulesdark-themehandcodednextjspersonal-websiteportfolioreact

720 B · 21 lines Raw History
 1#!/bin/sh
 2#
 3# For easy server deploys you can create add this post-receive hook to your
 4# server in a bare repo somewhere like /srv/git/isaacbythewood.com/hooks/post-receive
 5# and make a git clone in /srv/docker/isaacbythewood.com. This script will then
 6# run on pushing updates to the server to build and deploy new docker images.
 7
 8
 9while read oldrev newrev ref; do
10  if [ "$ref" = "refs/heads/master" ]; then
11    unset GIT_DIR  # unset GIT_DIR so that git pull works correctly
12    START_TIME=`date +%s`
13    cd /srv/docker/isaacbythewood.com
14    git pull
15    docker-compose up --build --detach
16    docker system prune --force
17    END_TIME=`date +%s`
18    echo Total build time: `expr $END_TIME - $START_TIME`s
19  fi
20done