Merge pull request #4 from Daoud-Hussain/workflows/deploy #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
push: | |
branches: [ "main" ] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Building docker image" | |
run: docker build -t daoudhussaindev/next-js-app . | |
- name: "Login Docker" | |
run: echo "${{secrets.DOCKER_PASSWORD}}" | docker login -u ${{secrets.DOCKER_USERNAME}} --password-stdin | |
- name: "Pushing Image to dockerhub" | |
run: docker push daoudhussaindev/next-js-app:latest |