From ede06fd2a3dad2f3cb9d8ef1528da522c46fc4cd Mon Sep 17 00:00:00 2001 From: Michael Absolon Date: Sun, 7 Jul 2024 04:43:23 +0200 Subject: [PATCH] feat(visualizator-be): Add auto deploy for Visualizator backend --- .github/workflows/deploy.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/deploy.yml 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