Look Back is eligible! #961
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 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 |