Skip to content

Docs : README.md 수정 #9

Docs : README.md 수정

Docs : README.md 수정 #9

Workflow file for this run

name: Deploy to Kubernetes
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm run test -- --coverage --watchAll=false --passWithNoTests
- name: Build application
CI: false

Check failure on line 30 in .github/workflows/deploy.yml

View workflow run for this annotation

GitHub Actions / Deploy to Kubernetes

Invalid workflow file

The workflow is not valid. .github/workflows/deploy.yml (Line: 30, Col: 7): Unexpected value 'CI'
run: npm run build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Container Registry
uses: docker/login-action@v2
with:
registry: ${{ secrets.REGISTRY_URL }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ secrets.REGISTRY_URL }}/trendist-frontend:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Set up kubectl
uses: azure/setup-kubectl@v3
with:
version: 'latest'
- name: Configure kubectl
run: |
echo "${{ secrets.KUBE_CONFIG }}" | base64 -d > $HOME/.kube/config
- name: Update deployment
run: |
sed -i 's|leeseojung/trendist-frontend:latest|${{ secrets.REGISTRY_URL }}/trendist-frontend:${{ github.sha }}|' k8s/deployment.yaml
kubectl apply -f k8s/
kubectl rollout status deployment/trendist-frontend