Skip to content

Commit

Permalink
feat: add deploy kube
Browse files Browse the repository at this point in the history
  • Loading branch information
speed2exe committed Dec 20, 2023
1 parent 0347260 commit 237cd78
Showing 1 changed file with 30 additions and 4 deletions.
34 changes: 30 additions & 4 deletions .github/workflows/deploy.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,35 @@ jobs:
uses: actions/checkout@v4
with:
repository: AppFlowy-IO/AppFlowy-Cloud-Deployment
token: ${{ secrets.GH_PAT }} # `GH_PAT` is a secret that contains your PAT
token: ${{ secrets.GH_PAT }}
- name: apply images
run: |
pwd
ls
exit 1
# export env var
source environments/base.env
source environments/test.env
export APPFLOWY_GOTRUE_JWT_SECRET=${{ secrets.TEST_GOTRUE_JWT_SECRET }}
export APPFLOWY_S3_ACCESS_KEY=${{ secrets.TEST_APPFLOWY_S3_ACCESS_KEY }}
export APPFLOWY_S3_SECRET_KEY=${{ secrets.TEST_APPFLOWY_S3_SECRET_KEY }}
export APPFLOWY_GOTRUE_ADMIN_PASSWORD=${{ secrets.TEST_APPFLOWY_GOTRUE_ADMIN_PASSWORD }}
export ADMIN_FRONTEND_IMAGE=appflowyinc/admin_frontend:dev
export APPFLOWY_IMAGE=appflowyinc/appflowy_cloud:dev
# keep track of final env deployment files
mkdir deployed
# dump all env var
env > deployed/.env
# create config map
kubernetes/scripts/env_to_configmap.sh < deployed/.env | tee deployed/appflowy-configmap.yaml | kubectl apply -f -
# deploy appflowy cloud
envsubst < kubernetes/templates/appflowy-cloud-deployment.yaml | tee deployed/appflowy-cloud-deployment.yaml | kubectl apply -f -
envsubst < kubernetes/templates/appflowy-cloud-service.yaml | tee deployed/appflowy-cloud-service.yaml | kubectl apply -f -
# deploy admin_frontend
envsubst < kubernetes/templates/admin-frontend-deployment.yaml | tee deployed/admin-frontend-deployment.yaml | kubectl apply -f -
envsubst < kubernetes/templates/admin-frontend-service.yaml | tee deployed/admin-frontend-service.yaml | kubectl apply -f -

0 comments on commit 237cd78

Please sign in to comment.