diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..9a8a0bc --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,19 @@ + +name: build remote +on: [push] +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: executing remote ssh commands using password + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.HOST }} + username: ${{ secrets.USERNAME }} + key: ${{ secrets.KEY }} + port: ${{ secrets.PORT }} + script: | + PATH=$PATH:/${{secrets.USERNAME}}/.nvm/versions/node/v18.8.0/bin + pm2 -v + pm2 restart website