Use npm link instead of npm i #99
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 Production | |
on: | |
push: | |
branches: | |
- production | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout production branch | |
uses: actions/checkout@v2 | |
with: | |
ref: production | |
- name: Install SSH | |
run: sudo apt-get update && sudo apt-get install -y openssh-client | |
- name: SSH into machine and restart service | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
username: ${{ secrets.SSH_USERNAME }} | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
passphrase: ${{ secrets.SSH_PASSPHRASE }} | |
port: ${{ secrets.SSH_PORT }} | |
script: | | |
cd server | |
git checkout production | |
git pull | |
venv/bin/python -m pip install -r requirements.txt | |
npm link | |
venv/bin/alembic upgrade head | |
systemctl restart muoversi |