Skip to content

fix: Minor change

fix: Minor change #66

Workflow file for this run

name: Frontend CI/CD
on:
push:
branches:
- master
paths:
- api/**
- frontend/**
- .github/workflows/frontend.yml
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Generate API client using OpenAPI generator
run: npm install @openapitools/openapi-generator-cli && npm run openapi-generate
working-directory: frontend
- name: Build container
run: docker build -t ghcr.io/kuzznya/letsdeploy/frontend:latest .
working-directory: frontend
- name: Login with docker
run: >
echo ${{ secrets.GITHUB_TOKEN }} | docker login --username kuzznya
--password-stdin ghcr.io/kuzznya
- name: Publish container
run: docker push ghcr.io/kuzznya/letsdeploy/frontend:latest
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Prepare .kube directory
run: mkdir ~/.kube || echo "Cannot create ~/.kube directory, skipping"
- name: Prepare kubeconfig
run: echo "${{ secrets.KUBECONFIG }}" > ~/.kube/config
- name: Deploy to Kubernetes
run: kubectl rollout restart deployment frontend --namespace letsdeploy