summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorJoffrey Bion <joffrey.bion@gmail.com>2021-02-07 02:31:46 +0100
committerGitHub <noreply@github.com>2021-02-07 02:31:46 +0100
commitdd31ec843d0c849095b052745d82f55ca42fa49d (patch)
treee4096155e61f3b3be346608ddaf0217e5c8aa1ff /.github/workflows
parentMake k8s credentials short-lived (diff)
downloadseven-wonders-dd31ec843d0c849095b052745d82f55ca42fa49d.tar.gz
seven-wonders-dd31ec843d0c849095b052745d82f55ca42fa49d.tar.bz2
seven-wonders-dd31ec843d0c849095b052745d82f55ca42fa49d.zip
Add digital ocean deployment
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/ci-cd.yml17
1 files changed, 17 insertions, 0 deletions
diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml
index 24f170c6..f3bd00fd 100644
--- a/.github/workflows/ci-cd.yml
+++ b/.github/workflows/ci-cd.yml
@@ -81,6 +81,23 @@ jobs:
ghcr.io/${{ github.repository_owner }}/${{ env.DOCKER_IMAGE_NAME }}:${{ env.DOCKER_IMAGE_TAG_BUILD }}
registry.heroku.com/${{ env.HEROKU_APP_NAME }}/web
+ - name: Install doctl
+ uses: digitalocean/action-doctl@v2
+ with:
+ token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
+
+ - name: Setup DigitalOcean kubeconfig
+ run: doctl kubernetes cluster kubeconfig save bro-cluster
+
+ - name: Update deployment file
+ run: TAG=${{ env.DOCKER_IMAGE_TAG_BUILD }} && sed -i 's|:latest|:'${TAG}'|' kubernetes/server.yml
+
+ - name: Deploy to DigitalOcean Kubernetes
+ run: kubectl apply -f kubernetes/server.yml
+
+ - name: Verify deployment
+ run: kubectl rollout status deployment/seven-wonders
+
- name: Heroku release (deploy Docker image)
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
bgstack15