diff options
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/ci-cd.yml | 17 |
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 }} |