diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..8e47d6ef --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,26 @@ +name: Deploy Visualizator Backend + +on: + push: + branches: + - main + paths: + - "apps/visualizator-be/**" + + # Enables manual trigger of the workflow + workflow_dispatch: + +jobs: + ci: + runs-on: self-hosted + defaults: + run: + working-directory: /${{ secrets.USER }}/xcm-tools + steps: + - run: git pull + - run: pnpm install + - run: pnpm build + - name: Restart PM2 process + run: pm2 restart visualizator-be + env: + PM2_HOME: /${{ secrets.USER }}/.pm2