Skip to content

update front-end.yml #4

update front-end.yml

update front-end.yml #4

Workflow file for this run

name: Frontend CI/CD
on:
push:
branches: [main]
paths:
- "front-end/**"
- ".github/workflows/front-end.yml"
jobs:
build-frontend:
runs-on: ubuntu-latest
timeout-minutes: 15
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"
- 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
timeout-minutes: 15
needs: build-frontend
defaults:
run:
working-directory: front-end
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