diff --git a/.github/workflows/continousint.yaml b/.github/workflows/continousint.yaml index f2f6b2f8..5ba7fa74 100644 --- a/.github/workflows/continousint.yaml +++ b/.github/workflows/continousint.yaml @@ -15,4 +15,21 @@ jobs: steps: - uses: actions/checkout@v4 - run: docker build --tag todo-app:test --target test . - - run: docker run todo-app:test \ No newline at end of file + - run: docker run todo-app:test + + deploy: + name: Push to Docker Hub and Trigger App Service for Deployment + runs-on: ubuntu-latest + needs: build + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/Mod9CD' }} + steps: + - uses: actions/checkout@v4 + - run: echo hello deploy + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_HUB_NASHU }} + password: ${{ secrets.DOCKER_HUB_DUPASSWORD }} + - run: docker build --tag nashussain76/todo-app:prod --target production . + - run: docker push nashussain76/todo-app:prod + - run: curl -dH -X POST '${{ secrets.APP_SERVICE_DEPLOYMENT_WEBHOOK }}' \ No newline at end of file diff --git a/todo_app/templates/index.html b/todo_app/templates/index.html index a7a167dd..062b1bef 100644 --- a/todo_app/templates/index.html +++ b/todo_app/templates/index.html @@ -3,7 +3,7 @@ {% block content %}
Just another to-do app.