diff --git a/.github/workflows/deploy-dev.yml b/.github/workflows/deploy-dev.yml new file mode 100644 index 00000000..6516af17 --- /dev/null +++ b/.github/workflows/deploy-dev.yml @@ -0,0 +1,20 @@ +name: Deploy to development environment + +on: + push: + branches: [ nih-2024 ] + +jobs: + + deploy: + name: Deploy + runs-on: ubuntu-latest + steps: + - name: Deploy, build and run + uses: appleboy/ssh-action@v1.2.0 + with: + host: ${{ secrets.HOST }} + username: root + password: ${{ secrets.PASSWORD }} + port: ${{ secrets.PORT }} + script: git pull && kill $(ps -ef | grep "/root/.nvm/versions/node/v16.13.1/bin/node /root/reveal-web/node_modules/react-scripts/scripts/start.js" | grep -v "grep" | awk '{print $2}') && npm i && nohup npm start &