diff options
author | 2020-11-15 01:28:02 +0000 | |
---|---|---|
committer | 2020-11-15 01:28:02 +0000 | |
commit | ac616a34632b3dfe4e0b02cec8cd086a8458b73b (patch) | |
tree | 7e1d2c360aacf688753269abf26dfeec59d5bd30 /.github/workflows/lint-test-deploy.yaml | |
parent | Add site manifest (diff) |
Update build flow to deploy to Kubernetes
Diffstat (limited to '')
-rw-r--r-- | .github/workflows/lint-test-deploy.yaml (renamed from .github/workflows/lint-test-build.yaml) | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/.github/workflows/lint-test-build.yaml b/.github/workflows/lint-test-deploy.yaml index e8d4e9cc..754d2e49 100644 --- a/.github/workflows/lint-test-build.yaml +++ b/.github/workflows/lint-test-deploy.yaml @@ -1,4 +1,4 @@ -name: Lint & Test +name: Lint, Test & Deploy on: push: @@ -120,7 +120,8 @@ jobs: run: docker-compose stop if: ${{ always() }} - build-and-push: + build-and-deploy: + name: Build and Deploy to Kubernetes needs: lint-test if: github.event_name != 'pull_request_target' && github.ref == 'refs/heads/master' runs-on: ubuntu-latest @@ -155,3 +156,17 @@ jobs: tags: | ghcr.io/python-discord/site:latest ghcr.io/python-discord/site:${{ steps.sha_tag.outputs.tag }} + + - name: Authenticate with Kubernetes + uses: azure/k8s-set-context@v1 + with: + method: kubeconfig + kubeconfig: ${{ secrets.KUBECONFIG }} + + - name: Deploy to Kubernetes + uses: Azure/k8s-deploy@v1 + with: + manifests: | + deployment.yaml + images: 'ghcr.io/python-discord/site:${{ steps.sha_tag.outputs.tag }}' + kubectl-version: 'latest' |