viossa.net/stage.sh
nikomiko 7f891fd3da fix: scripts
try 2 make them work on the server
2026-02-08 07:35:55 -05:00

15 lines
No EOL
574 B
Bash
Executable file

#!/bin/bash
#
# Deployment script to be run remotely on push to master at https://github.com/ViossaDiskordServer/ViossaDotNet/
# Stages static content in a folder immediately for testing. run ./deploy.sh to convert main site.
# Usage: sh ./stage.sh SOURCE_DIR
#
SOURCE_DIR=$1
npm i -g pnpm && pnpm setup && pnpm i -g turbo || { echo "Can't install node dependencies 😓 - code $?"; exit; }
cd "$SOURCE_DIR" || { echo "Can't cd 😓 - code $?"; exit; }
git fetch --all && git branch "backup-$(date +'%s')" \
&& git checkout -f origin/main \
&& pnpm i && npx turbo build