Skip to content

Merge branch 'main' of https://github.com/Hufsthon2024Oeteco/FE #2

Merge branch 'main' of https://github.com/Hufsthon2024Oeteco/FE

Merge branch 'main' of https://github.com/Hufsthon2024Oeteco/FE #2

Workflow file for this run

name: Deploy Vite React App to k3s
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Install dependencies
run: npm install
- name: Build the Vite app
run: npm run build
- name: Build Docker image
run: docker build -t ${{ secrets.DOCKER_REGISTRY }}/oeteco_front:latest .
- name: Push Docker image
run: docker push ${{ secrets.DOCKER_REGISTRY }}/oeteco_front:latest
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Set up KUBECONFIG
run: |
mkdir $HOME/.kube
echo "${{ secrets.KUBECONFIG }}" > $HOME/.kube/config
- name: Install kubectl
uses: azure/setup-kubectl@v3
with:
version: 'latest'
- name: Rollout restart the deployment
run: |
kubectl rollout restart -n lgtu deployments/oeteco-front