Deploy to shusher.gi.ucsc.edu #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to shusher.gi.ucsc.edu | |
on: | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: SSH into shusher.gi.ucsc.edu and update running shusher | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.SSH_HOSTNAME }} | |
username: ${{ secrets.SSH_USERNAME }} | |
password: ${{ secrets.SSH_PASSWORD }} | |
port: ${{ secrets.SSH_PORT }} | |
script: | | |
cd /data | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash | |
source ~/.bashrc | |
nvm install 13.14 | |
nvm use 13.14 | |
rm -rf temp/* | |
mkdir -p temp | |
cd temp | |
wget https://github.com/amkram/shusher/archive/refs/tags/latest.tar.gz | |
tar xvzf latest.tar.gz | |
cd shusher-latest/web-app | |
npm install | |
npm run build | |
cd /data | |
pkill screen | |
rm -rf shusher-latest | |
mv temp/shusher-latest shusher-latest | |
cd shusher-latest/web-app | |
screen -dmS shusher | |
screen -S shusher -X stuff 'npm run start\n' |