Skip to content

Deploy to Digital Ocean Kubernetes #9

Deploy to Digital Ocean Kubernetes

Deploy to Digital Ocean Kubernetes #9

Workflow file for this run

name: Deploy to Digital Ocean Kubernetes
on:
workflow_run:
workflows: ["Build and Push Docker images"]
types:
- completed
branches:
- master
workflow_dispatch:
env:
DO_K8S_CLUSTER_NAME: "loadtesting-lon-01"
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DO_TOKEN }}
- name: Save digitalocean kubeconfig
run: doctl kubernetes cluster kubeconfig save --expiry-seconds 600 ${{ env.DO_K8S_CLUSTER_NAME }}
- name: Stop previous deployments
run: kubectl delete -f ./deployments/k8s || true
- name: Deploy to Digital Ocean Kubernetes
run: kubectl apply -f ./deployments/k8s