From 7d9a82e44a050b998b09259c18c45c46e9eb42e4 Mon Sep 17 00:00:00 2001 From: Sergej Date: Tue, 19 Nov 2024 15:50:24 +0100 Subject: [PATCH] Add development deployment pipeline --- .github/workflows/deploy-dev.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/deploy-dev.yml 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 &