diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5cc5316..f255d6a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,30 +13,29 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + - name: Set up Docker + run: | + sudo apt-get update + sudo apt-get install -y docker.io - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" --password-stdin - - name: Build and push web image - uses: docker/build-push-action@v5 - with: - context: . - file: ./apps/web/Dockerfile - push: true - tags: ${{ secrets.DOCKERHUB_USERNAME }}/zapishis-web:latest + - name: Build web image + run: | + docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/zapishis-web:latest -f ./apps/web/Dockerfile . - - name: Build and push bot image - uses: docker/build-push-action@v5 - with: - context: . - file: ./apps/bot/Dockerfile - push: true - tags: ${{ secrets.DOCKERHUB_USERNAME }}/zapishis-bot:latest + - name: Push web image to Docker Hub + run: | + docker push ${{ secrets.DOCKERHUB_USERNAME }}/zapishis-web:latest + + - name: Build bot image + run: | + docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/zapishis-bot:latest -f ./apps/bot/Dockerfile . + + - name: Push bot image to Docker Hub + run: | + docker push ${{ secrets.DOCKERHUB_USERNAME }}/zapishis-bot:latest deploy: name: Deploy to VPS