Skip to content

Fix: Correct backend folder structure for CI/CD #3

Fix: Correct backend folder structure for CI/CD

Fix: Correct backend folder structure for CI/CD #3

# 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