79c1d4ac82
Build & Deploy Homepage / build-and-deploy (push) Successful in 9s
- 반응형 랜딩 페이지 (hero, features, how-it-works, solutions, AI agent, use cases, architecture, testimonials, FAQ, CTA) - 모든 체험/로그인 CTA는 https://solution.invyone.com/login 으로 연결 - Dockerfile + nginx 설정으로 정적 파일 서빙 - k8s manifests (namespace/deployment/service NodePort 30082) - Gitea Actions 자동 배포 워크플로우
46 lines
1.3 KiB
YAML
46 lines
1.3 KiB
YAML
name: Build & Deploy Homepage
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- master
|
|
|
|
env:
|
|
REGISTRY: localhost:5000
|
|
IMAGE: invyone/homepage
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set commit SHA
|
|
run: echo "SHORT_SHA=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_ENV
|
|
|
|
- name: Build image
|
|
run: |
|
|
docker build -t ${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ env.SHORT_SHA }} .
|
|
|
|
- name: Push image
|
|
run: |
|
|
docker push ${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ env.SHORT_SHA }}
|
|
docker tag ${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ env.SHORT_SHA }} ${{ env.REGISTRY }}/${{ env.IMAGE }}:latest
|
|
docker push ${{ env.REGISTRY }}/${{ env.IMAGE }}:latest
|
|
|
|
- name: Deploy to Kubernetes
|
|
run: |
|
|
export KUBECONFIG=/home/chpark/.kube/config
|
|
|
|
kubectl apply -f k8s/namespace.yaml
|
|
kubectl apply -f k8s/deployment.yaml
|
|
kubectl apply -f k8s/service.yaml
|
|
|
|
kubectl set image deployment/homepage \
|
|
homepage=${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ env.SHORT_SHA }} \
|
|
-n invyone-homepage
|
|
|
|
kubectl rollout status deployment/homepage -n invyone-homepage --timeout=120s
|