From c338a4d0cb4648bd383c7ca8cdd270f9486fccf8 Mon Sep 17 00:00:00 2001 From: HalloSouf Date: Wed, 3 Jul 2024 20:42:38 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=AA=B6chore:=20update=20deploy-prod.yml?= =?UTF-8?q?=20(#13)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-prod.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml index 7ec45fd..5481ef2 100644 --- a/.github/workflows/deploy-prod.yml +++ b/.github/workflows/deploy-prod.yml @@ -23,4 +23,24 @@ jobs: password: ${{ secrets.SERVER_PASSWORD }} script: | # Change directory to project directory - cd mcdata-api + cd mcevert/store-service + + # Load environment variables + echo " + APP_NAME=${{ vars.APP_NAME }} + APP_ENV=${{ vars.APP_ENV }} + APP_PORT=${{ vars.APP_PORT }} + APP_URL=${{ vars.APP_URL }} + " > .env + + # Pull newest code + git pull + + # Install newest dependencies + yarn install --frozen-lockfile + + # Build production code + yarn build + + # Restart process manager + pm2 restart "store-service"