Skip to content

fix weirdness

fix weirdness #973

name: Deploy Production
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.AWARDS_WEB_SSH_KEY }}
- run: |
ssh -o StrictHostKeyChecking=no [email protected] /bin/bash << 'EOF'
# report failure if any command fails
set -e
# manually source nvm since bashrc exits early unless session is interactive
source "$HOME/.nvm/nvm.sh"
# checkout changes
cd "$HOME/apps/awards-web"
git fetch --all
git reset --hard origin/master
# upgrade to current node version
nvm install --latest-npm
# update deps, rebuild
yarn
yarn migrate
yarn build-prod
# restart server
pm2 restart awards-web
EOF