Added deploy script
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Shahan Nedadahandeh 2022-12-29 16:30:11 -05:00
parent fbb0ca25ac
commit d9fd55c4c0
1 changed files with 26 additions and 0 deletions

26
deploy.sh Executable file
View File

@ -0,0 +1,26 @@
#!/usr/bin/env bash
set -ex
ulimit -u 512
DIR=$(mktemp --directory)
trap "rm -rf $DIR" EXIT
pushd $DIR
git clone file:///srv/git/www/cs-2022-class-profile.git --depth=1
cd cs-2022-class-profile
npm install
npm run build
npm run export
chgrp -R www out
chmod -R g+w out
shopt -s dotglob
rm -rf /srv/classprofile/2022/*
mv out/* /srv/classprofile/2022/
popd