Skip to content

Commit

Permalink
Merge pull request #45 from Giveth/staging
Browse files Browse the repository at this point in the history
Fix github actions config
  • Loading branch information
mohammadranjbarz authored Feb 20, 2023
2 parents 58af348 + 2a4e68a commit abee13e
Showing 1 changed file with 22 additions and 20 deletions.
42 changes: 22 additions & 20 deletions .github/workflows/CI-CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,26 +82,6 @@ jobs:
username: ${{ secrets.STAGING_USERNAME }}
privateKey: ${{ secrets.STAGING_PRIVATE_KEY}}

deploy-k8s:
if: github.ref == 'refs/heads/main'|| github.ref == 'refs/heads/staging'
needs: publish
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@master
- name: Deploy to Staging Cluster
if: github.ref == 'refs/heads/staging'
uses: steebchen/[email protected]
with: # defaults to latest kubectl binary version
config: ${{ secrets.KUBE_CONFIG }}
command: rollout restart deployments/notification-center -n backend
- name: Verify Staging Deployment
if: github.ref == 'refs/heads/staging'
uses: steebchen/[email protected]
with:
config: ${{ secrets.KUBE_CONFIG }}
version: v1.24.2 # specify kubectl binary version explicitly
command: rollout status deployments/notification-center -n backend
- name: Production deploy
if: github.ref == 'refs/heads/main'
uses: garygrossgarten/[email protected]
Expand All @@ -110,3 +90,25 @@ jobs:
host: ${{ secrets.PRODUCTION_HOST }}
username: ${{ secrets.PRODUCTION_USERNAME }}
privateKey: ${{ secrets.PRODUCTION_PRIVATE_KEY}}


deploy-k8s:
if: github.ref == 'refs/heads/main'|| github.ref == 'refs/heads/staging'
needs: publish
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@master
- name: Deploy to Staging Cluster
if: github.ref == 'refs/heads/staging'
uses: steebchen/[email protected]
with: # defaults to latest kubectl binary version
config: ${{ secrets.KUBE_CONFIG }}
command: rollout restart deployments/notification-center -n backend
- name: Verify Staging Deployment
if: github.ref == 'refs/heads/staging'
uses: steebchen/[email protected]
with:
config: ${{ secrets.KUBE_CONFIG }}
version: v1.24.2 # specify kubectl binary version explicitly
command: rollout status deployments/notification-center -n backend

0 comments on commit abee13e

Please sign in to comment.