-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
070d311
commit 376021a
Showing
1 changed file
with
12 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,38 +77,26 @@ jobs: | |
if: github.ref == 'refs/heads/staging' | ||
uses: garygrossgarten/[email protected] | ||
with: | ||
command: cd notification-center && git checkout staging && git pull && docker-compose -f docker-compose-staging.yml pull && docker-compose -f docker-compose-staging.yml down && docker-compose -f docker-compose-staging.yml up -d && docker image prune -a --force; | ||
host: ${{ secrets.STAGING_HOST_ALL }} | ||
username: ${{ secrets.STAGING_USERNAME_ALL }} | ||
privateKey: ${{ secrets.STAGING_PRIVATE_KEY_ALL}} | ||
script: | | ||
cd giveth-all | ||
docker compose stop notification-center | ||
docker compose pull notification-center | ||
docker compose up -d notification-center | ||
docker image prune -a --force | ||
- name: Production deploy | ||
if: github.ref == 'refs/heads/main' | ||
uses: garygrossgarten/[email protected] | ||
with: | ||
command: cd notification-center && git checkout main && git pull && docker-compose -f docker-compose-production.yml pull && docker-compose -f docker-compose-production.yml down && docker-compose -f docker-compose-production.yml up -d && docker image prune -a --force; | ||
host: ${{ secrets.PROD_HOST_ALL }} | ||
username: ${{ secrets.PROD_USERNAME_ALL }} | ||
privateKey: ${{ secrets.PROD_PRIVATE_KEY_ALL}} | ||
|
||
|
||
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 | ||
script: | | ||
cd giveth-all | ||
docker compose stop notification-center | ||
docker compose pull notification-center | ||
docker compose up -d notification-center | ||
docker image prune -a --force |