diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 31586e4..0ca62b2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -16,9 +16,9 @@ jobs: - name: Build and push Docker image run: | docker build -t bolhadev-chat --build-arg PROJECT=server . - docker tag whatsapp-newsletter:latest ${{ envs.DOCKER_REPO}}:latest - docker login -u ${{ envs.DOCKER_USERNAME }} -p ${{secrets.DOCKER_TOEKEN}} - docker push ${{ envs.DOCKER_REPO}}:latest + docker tag whatsapp-newsletter:latest ${{ env.DOCKER_REPO}}:latest + docker login -u ${{ env.DOCKER_USERNAME }} -p ${{secrets.DOCKER_TOEKEN}} + docker push ${{ env.DOCKER_REPO}}:latest - name: SSH into EC2 instance and deploy uses: appleboy/ssh-action@master with: @@ -26,7 +26,7 @@ jobs: username: ${{ secrets.EC2_USERNAME }} key: ${{ secrets.MY_EC2_SSH_KEY }} script: | - sudo docker pull ${{ envs.DOCKER_REPO }}:latest + sudo docker pull ${{ env.DOCKER_REPO }}:latest sudo docker stop my-node-app || true sudo docker rm my-node-app || true - sudo docker run -d -p 3000:3000 --name my-node-app ${{ envs.DOCKER_REPO }}:latest + sudo docker run -d -p 3000:3000 --name my-node-app ${{ env.DOCKER_REPO }}:latest