Skip to content

Commit

Permalink
created action for gauzy api stage on digitalOcean droplet
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffrey1330 committed Mar 2, 2024
1 parent bce64a8 commit 114ec70
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/deploy-do-droplet-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,29 @@ jobs:
- name: checkout out code
uses: actions/checkout@v4

- name: Inject secrets into .env-template.compose
- name: Modify API_BASE_URL
run: |
if [ "${{ env.INGRESS_CERT_TYPE }}" = "cloudflare" ]; then
echo "API_BASE_URL=https://apidemodt.gauzy.co" >> $GITHUB_ENV
elif [ "${{ env.INGRESS_CERT_TYPE }}" = "letsencrypt" ]; then
echo "API_BASE_URL=https://apidemodts.gauzy.co" >> $GITHUB_ENV
else
echo "API_BASE_URL UNKNOWN INGRESS_CERT_TYPE"
fi
env:
INGRESS_CERT_TYPE: 'cloudflare'

- name: Inject secrets into .env-template.compose
run: |
envsubst < $GITHUB_WORKSPACE/.deploy/ssh/with-cloudflare/docker-compose.api.demo.template.yml > temp.yaml && mv temp.yaml $GITHUB_WORKSPACE/.deploy/ssh/with-cloudflare/docker-compose.api.demo.yml
envsubst < $GITHUB_WORKSPACE/.deploy/ssh/with-letsencrypt/docker-compose.api.demo.template.yml > temp.yaml && mv temp.yaml $GITHUB_WORKSPACE/.deploy/ssh/with-letsencrypt/docker-compose.api.demo.yml
env:
INGRESS_CERT_TYPE: 'cloudflare'
ENV_NAME: 'demo'
DEMO: 'true'
NODE_ENV: 'development'
ADMIN_PASSWORD_RESET: 'true'
API_HOST: $API_HOST
API_BASE_URL: ${{ if eq(env.INGRESS_CERT_TYPE, 'cloudflare') }} 'https://apidemodt.gauzy.co' ${{ else if eq(env.INGRESS_CERT_TYPE, 'letsencrypt') }} 'https://apidemodts.gauzy.co' ${{ else }} 'UNKNOWN INGRESS_CERT_TYPE' ${{ endif }}
API_BASE_URL: '${{ env.API_BASE_URL }}'
CLIENT_BASE_URL: 'https://demo.gauzy.co'
DB_TYPE: '${{ secrets.DB_TYPE }}'
DB_URI: '${{ secrets.DB_URI }}'
Expand Down

0 comments on commit 114ec70

Please sign in to comment.