Skip to content

changed gunicorn command #6

changed gunicorn command

changed gunicorn command #6

Workflow file for this run

name: DO Kubernetes pipeline
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout master
uses: actions/checkout@main
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- name: Build container image
run: docker build -t ${{ secrets.DO_REGISTRY_NAME }}/deepface:$(echo $GITHUB_SHA | head -c7) .
- name: Log in to DigitalOcean Container Registry with short-lived credentials
run: doctl registry login --expiry-seconds 1200
- name: Delete previous image from DigitalOcean Container Registry
run: |
IMAGE_TAG=$(echo $GITHUB_SHA | head -c7)
doctl registry repository delete-manifest ${{ secrets.DO_REGISTRY_NAME }}/deepface:$IMAGE_TAG --force
- name: Push image to DigitalOcean Container Registry
run: docker push ${{ secrets.DO_REGISTRY_NAME }}/deepface:$(echo $GITHUB_SHA | head -c7)
- name: Update deployment file
run: TAG=$(echo $GITHUB_SHA | head -c7) && sed -i 's|<IMAGE>|${{ secrets.DO_REGISTRY_NAME }}/deepface:'${TAG}'|' $GITHUB_WORKSPACE/config/deployment.yml
- name: Save DigitalOcean kubeconfig with short-lived credentials
run: doctl kubernetes cluster kubeconfig save --expiry-seconds 600 ${{ secrets.K8S_CLUSTER_NAME }}
- name: Deploy to DigitalOcean Kubernetes
run: kubectl apply -f $GITHUB_WORKSPACE/config/deployment.yml
- name: Verify deployment
run: kubectl rollout status deployment/deepface