GoScrobble/init/deploy.sh

24 lines
443 B
Bash
Raw Permalink Normal View History

#!/bin/bash
# Easy deploy script..
echo 'Fetching latest git commit'
2021-12-25 00:30:55 +00:00
cd /var/www/goscrobble-api
git pull
echo 'Building backend'
2022-01-05 22:30:15 +00:00
go build -o goscrobble cmd/goscrobble/*.go
2022-01-05 22:30:15 +00:00
echo 'Fetching lastest frontend commit'
2021-12-25 00:30:55 +00:00
cd /var/www/goscrobble-web
2022-01-05 22:30:15 +00:00
git pull
echo 'Installing frontend packages'
npm install --production
echo 'Building frontend'
npm run build --env production
cd ..
echo 'Restarting Go service'
systemctl restart goscrobble.service