Merge pull request #76 from zxenonx/snyk-fix-46a67cfde0abc02575c5d5e2… #13
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: Zuri messaging dev Deployment | |
on: | |
# Triggers the workflow on push or pull request events but only for the main branch | |
push: | |
branches: [dev] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Git Pull on Server | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.ZURI_HOST }} | |
username: ${{ secrets.USERNAME }} | |
password: ${{ secrets.PASSWORD }} | |
script: | | |
cd /var/www/zuri.chat/zurimessaging/dev/zc_messaging/frontend | |
git fetch --all | |
git reset --hard origin/dev | |
git stash | |
git pull | |
yarn setup | |
yarn build | |
cd ../backend | |
source venv/bin/activate | |
python -m pip install --upgrade pip | |
pip install --no-cache-dir -r requirements.txt | |
pm2 restart zuri_messaging |