From aa777430bff18ddb87d65564bac1322f40a18f6f Mon Sep 17 00:00:00 2001 From: Kristina Date: Wed, 6 Mar 2024 22:09:39 +0000 Subject: [PATCH] + --- .github/workflows/backEnd.yml | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/.github/workflows/backEnd.yml b/.github/workflows/backEnd.yml index 79a2af17ce..04b6db06a3 100644 --- a/.github/workflows/backEnd.yml +++ b/.github/workflows/backEnd.yml @@ -13,22 +13,18 @@ jobs: - name: Checkout repository//download the source code repository uses: actions/checkout@v3 - - name: Create private key - run: echo "${{ secrets.AWS_PEM}}" > myPlayList-key-pair.pem - - - name: Update PATH + - name: Create private key file and change permissions to read-only run: | - set PATH=$PATH:/home/ubuntu/.nvm/versions/node/v20.11.1/bin/ + echo "${{ secrets.AWS_PEM}}" > myPlayList-key-pair.pem + chmod 400 myPlayList-key-pair.pem - name: Install dependencies and build - run: | - chmod 400 myPlayList-key-pair.pem - echo "${{vars.AWS_HOST_NAME}}@${{vars.AWS_HOST}}" - cat myPlayList-key-pair.pem + run: ssh -i myPlayList-key-pair.pem -o StrictHostKeyChecking=no ${{vars.AWS_HOST_NAME}}@${{vars.AWS_HOST}} ' - cd Full-Stack-Project-Assessment && - pwd && - git pull && - cd server && - pm2 -v - ' + cd Full-Stack-Project-Assessment/server/ && + git pull && + cd server && + node -v && + npm -v && + pm2 -v + '