Skip to content

add front end

add front end #1

Workflow file for this run

name: Frontend CI/CD
on:
push:
branches: [main]
paths:
- "front-end/**"
jobs:
build-frontend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: front-end
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "24.8.0"
cache: "npm"
- name: Install dependencies
run: npm install
- name: Build frontend
run: npm run build
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: frontend-build
path: dist/
deploy-frontend:
runs-on: ubuntu-latest
needs: build-frontend
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: frontend-build
path: dist/
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build Docker image
uses: docker/build-push-action@v5
with:
context: ./front-end
file: ./front-end/Dockerfile
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/frontend-aws-integration:latest