aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/deploy.yaml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/deploy.yaml')
-rw-r--r--.github/workflows/deploy.yaml52
1 files changed, 0 insertions, 52 deletions
diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml
deleted file mode 100644
index 0e315327..00000000
--- a/.github/workflows/deploy.yaml
+++ /dev/null
@@ -1,52 +0,0 @@
-name: Deploy
-
-on:
- workflow_run:
- workflows: ["Build"]
- branches:
- - main
- types:
- - completed
-
-jobs:
- deploy:
- if: github.event.workflow_run.conclusion == 'success'
- name: Deploy to Kubernetes Cluster
- runs-on: ubuntu-latest
- environment: production
-
- steps:
- - name: Create SHA Container Tag
- id: sha_tag
- run: |
- tag=$(cut -c 1-7 <<< $GITHUB_SHA)
- echo "::set-output name=tag::$tag"
-
- # Check out the private Kubernetes repository for the
- # deployment.yaml file using a GitHub Personal Access
- # Token to get access.
- - name: Checkout code
- uses: actions/checkout@v2
- with:
- repository: python-discord/kubernetes
- token: ${{ secrets.REPO_TOKEN }}
-
- - 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: |
- namespaces/default/site/deployment.yaml
- images: 'ghcr.io/python-discord/site:${{ steps.sha_tag.outputs.tag }}'
- kubectl-version: 'latest'
-
- - name: Purge Cloudflare Edge Cache
- uses: jakejarvis/cloudflare-purge-action@master
- env:
- CLOUDFLARE_ZONE: 989c984a358bfcd1e9b9d188cc86c1df
- CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_CACHE_TOKEN }}