diff --git a/.github/workflows/auto.yml b/.github/workflows/auto.yml index 8a1565d..e98ea4c 100644 --- a/.github/workflows/auto.yml +++ b/.github/workflows/auto.yml @@ -1,4 +1,4 @@ -name: Automated deployment ๐Ÿค– +name: Automated Testing and Verification ๐Ÿค– on: push: @@ -15,4 +15,4 @@ jobs: - name: Build Docker image ๐Ÿณ run: | - docker build -f docker/staging/Dockerfile . --tag ${{ secrets.DOCKER_REGISTRY }}/stage-deployment \ No newline at end of file + docker build -f docker/staging/Dockerfile . --tag ${{ secrets.DOCKER_USERNAME }}/stage-deployment \ No newline at end of file diff --git a/.github/workflows/prod.yml b/.github/workflows/prod.yml index 00fcd5d..a0fe398 100644 --- a/.github/workflows/prod.yml +++ b/.github/workflows/prod.yml @@ -9,17 +9,17 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout code ๐Ÿ”Ž + - name: Checkout repository ๐Ÿ”Ž uses: actions/checkout@v3 - name: Build Docker image ๐Ÿณ run: | - docker build -f docker/production/Dockerfile . --tag ${{ secrets.DOCKER_REGISTRY }}/${{ secrets.DOCKER_PROD_IMAGE_NAME }}:latest + docker build -f docker/production/Dockerfile . --tag ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_PROD_IMAGE_NAME }}:latest - name: Publish Docker image ๐Ÿ“ฆ run: | - docker login -u ${{ secrets.DOCKER_REGISTRY }} -p ${{ secrets.DOCKER_HUB_TOKEN }} - docker push ${{ secrets.DOCKER_REGISTRY }}/${{ secrets.DOCKER_PROD_IMAGE_NAME }} + docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} + docker push ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_PROD_IMAGE_NAME }} deploy: needs: build @@ -34,6 +34,6 @@ jobs: ssh-keyscan -H ${{ secrets.HOST }} > ~/.ssh/known_hosts - name: Pull and run container ๐Ÿƒ๏ธ - run: ssh ${{ secrets.USERNAME }}@${{ secrets.HOST }} "cd ${{ secrets.WORK_DIR_PROD }} && docker image prune -f && docker compose pull && docker compose up -d && exit" + run: ssh ${{ secrets.USERNAME }}@${{ secrets.HOST }} "cd prod-minddaily && docker image prune -f && docker compose pull && docker compose up -d && exit" - name: Cleanup ๐Ÿงน run: rm -rf ~/.ssh \ No newline at end of file diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index ea47b14..a681c0e 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -14,12 +14,12 @@ jobs: - name: Build Docker image ๐Ÿณ run: | - docker build -f docker/staging/Dockerfile . --tag ${{ secrets.DOCKER_REGISTRY }}/${{ secrets.DOCKER_STAGE_IMAGE_NAME }}:latest + docker build -f docker/staging/Dockerfile . --tag ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_STAGE_IMAGE_NAME }}:latest - name: Publish Docker image ๐Ÿ“ฆ run: | - docker login -u ${{ secrets.DOCKER_REGISTRY }} -p ${{ secrets.DOCKER_HUB_TOKEN }} - docker push ${{ secrets.DOCKER_REGISTRY }}/${{ secrets.DOCKER_STAGE_IMAGE_NAME }} + docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} + docker push ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_STAGE_IMAGE_NAME }} deploy: needs: build @@ -34,6 +34,6 @@ jobs: ssh-keyscan -H ${{ secrets.HOST }} > ~/.ssh/known_hosts - name: Pull and run container ๐Ÿƒ๏ธ - run: ssh ${{ secrets.USERNAME }}@${{ secrets.HOST }} "cd ${{ secrets.WORK_DIR_STAGE }} && docker image prune -f && docker compose pull && docker compose up -d && exit" + run: ssh ${{ secrets.USERNAME }}@${{ secrets.HOST }} "cd stage-minddaily && docker image prune -f && docker compose pull && docker compose up -d && exit" - name: Cleanup ๐Ÿงน run: rm -rf ~/.ssh \ No newline at end of file