Skip to content

Merge pull request #1 from itachi21113/deploying #12

Merge pull request #1 from itachi21113/deploying

Merge pull request #1 from itachi21113/deploying #12

# Name for our workflow, which will appear in the GitHub Actions tab
name: Build and Push Docker Images
on:
push:
branches:
- master # Corrected to use 'master' as your branch name
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push backend image
uses: docker/build-push-action@v4
with:
context: ./ecom-backend
push: true
tags: itachi21113/ecom-backend:latest
- name: Build and push frontend image
uses: docker/build-push-action@v4
with:
context: ./myShop-frontend
push: true
tags: itachi21113/ecom-frontend:latest