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