From ea762e275d7d0bd8f900ad09217ceca0d29147a6 Mon Sep 17 00:00:00 2001 From: kogepanh Date: Tue, 27 Jul 2021 19:34:21 +0900 Subject: [PATCH] #2 fix ci/cd --- .github/workflows/deploy.yml | 2 +- scripts/rebuild.sh | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 71cd003..ad45a52 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -17,7 +17,7 @@ jobs: - run: chmod 600 ./aws_lightsail_key - - run: ssh -o StrictHostKeyChecking=no -i ./aws_lightsail_key ${{ secrets.SERVER_USERNAME }}@${{ secrets.SERVER_HOST }} "cd /var/www/html/mrc && bash scripts/rebuild.sh" + - run: ssh -o StrictHostKeyChecking=no -i ./aws_lightsail_key ${{ secrets.SERVER_USERNAME }}@${{ secrets.SERVER_HOST }} "cd /var/www/html/mrc && git pull origin main && bash scripts/rebuild.sh" - uses: rtCamp/action-slack-notify@v2 env: diff --git a/scripts/rebuild.sh b/scripts/rebuild.sh index 6890a12..fdefe3c 100644 --- a/scripts/rebuild.sh +++ b/scripts/rebuild.sh @@ -1,6 +1,5 @@ #!/bin/bash -git pull origin main yarn install --production if [ -z "`ps aux | grep "next build" | grep -v grep`" ]; then