www-new/deploy.sh

29 lines
323 B
Bash
Executable File

#!/usr/bin/env bash
set -ex
ulimit -u 512
DIR=$(mktemp --directory)
pushd $DIR
git clone https://git.csclub.uwaterloo.ca/www/www-new.git --depth=1
cd www-new
npm install
npm run build
npm run export
chgrp -R www out
chmod -R g+w out
shopt -s dotglob
rm -rf /srv/www-csc/*
mv out/* /srv/www-csc/
popd
rm -rf $DIR