viossa.net/stage.sh
nikomiko 227df50f31 fix: scripts
update the scripts to source ~/.bashrc in hopes of making sure that npm, turbo, etc. are available
2026-02-08 19:23:59 -05:00

17 lines
No EOL
521 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
source ~/.bashrc # make sure NPM commands etc are available
npm i -g pnpm && pnpm setup && pnpm i -g turbo
cd "$SOURCE_DIR"
git fetch --all && git branch "backup-$(date +'%s')" \
&& git checkout -f origin/main \
&& pnpm i && npx turbo build