From dd31ec843d0c849095b052745d82f55ca42fa49d Mon Sep 17 00:00:00 2001 From: Joffrey Bion Date: Sun, 7 Feb 2021 02:31:46 +0100 Subject: Add digital ocean deployment --- .github/workflows/ci-cd.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to '.github/workflows') 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 }} -- cgit