Skip to content

Commit

Permalink
Fix build-deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
omidasadpour authored Jul 20, 2023
1 parent 1d66a46 commit 71def3c
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,22 +213,16 @@ jobs:
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN_PROD }}
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN_STAGING }}

- name: Save DigitalOcean kubeconfig with short-lived credentials
run: doctl kubernetes cluster kubeconfig save --expiry-seconds 600 ${{ secrets.K8S_PROD }}
run: doctl kubernetes cluster kubeconfig save --expiry-seconds 600 ${{ secrets.K8S_STAGING }}

- name: Update deploy file
run: TAG=${{ env.name }}-$(echo $GITHUB_SHA | head -c7) && sed -i 's|<IMAGE>|dappforce/subsocial-web-app:'${TAG}'|' $GITHUB_WORKSPACE/deployment/xsocial-cms/deployment.yaml

- name: Remove HPA
run: kubectl delete hpa -n sub-back xsocial-cms-web-app

- name: Deploy to DigitalOcean Kubernetes
run: kubectl apply -f $GITHUB_WORKSPACE/deployment/xsocial-cms/

- name: Verify deployment
run: kubectl -n sub-back rollout status deployment/xsocial-cms-web-app

- name: Recreate HPA
run: kubectl create -f $GITHUB_WORKSPACE/deployment/hpa/xsocial-cms-hpa.yaml

0 comments on commit 71def3c

Please sign in to comment.