Skip to content

Commit

Permalink
feat: automatically set the NxXT_PUBLIC_ALOKAI_MIDDLEWARE_CDN_CACHE_B…
Browse files Browse the repository at this point in the history
…USTING_ID
  • Loading branch information
grixu committed Jul 10, 2024
1 parent c8f6b22 commit 6b8e137
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
1 change: 0 additions & 1 deletion build-frontend/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,3 @@ runs:
NPM_USER=${{ inputs.npm_user }}
NPM_REGISTRY=${{ inputs.npm_registry }}
NUXT_IMAGE_PROVIDER=${{ inputs.image_provider }}
GIT_SHA=${{ steps.resolve.outputs.version }}
13 changes: 2 additions & 11 deletions deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,13 @@ runs:
environment: production
initial-status: in_progress

- name: Deploy Frontend App (${{ inputs.project_name }}.${{ inputs.cloud_region }}.gcp.storefrontcloud.io)
- name: Deploy (${{ inputs.project_name }}.${{ inputs.cloud_region }}.gcp.storefrontcloud.io)
uses: fjogeleit/http-request-action@v1
with:
url: "${{ inputs.console_api_url }}/cloud/instances/${{ inputs.project_name }}-${{ inputs.cloud_region }}-gcp-storefrontcloud-io/deploy"
method: "PATCH"
customHeaders: '{"Content-Type":"application/json"}'
data: '{ "cloudUserId":"${{ inputs.cloud_username }}", "cloudUserPassword":"${{ inputs.cloud_password }}", "dockerImageHash":"${{ inputs.version || github.sha }}" }'
timeout: 60000

- name: Deploy Middleware (${{ inputs.project_name }}.${{ inputs.cloud_region }}.gcp.storefrontcloud.io)
uses: fjogeleit/http-request-action@v1
with:
url: "${{ inputs.console_api_url }}/cloud/instances/${{ inputs.project_name }}-${{ inputs.cloud_region }}-gcp-storefrontcloud-io/deploy"
method: "PATCH"
customHeaders: '{"Content-Type":"application/json"}'
data: '{ "middleware":true, "cloudUserId":"${{ inputs.cloud_username }}", "cloudUserPassword":"${{ inputs.cloud_password }}", "dockerImageHash":"${{ inputs.version || github.sha }}", "middlewareData":{ "path":"/api/", "port":4000, "has_base_path":false } }'
data: '{ "middleware":true, "cloudUserId":"${{ inputs.cloud_username }}", "cloudUserPassword":"${{ inputs.cloud_password }}", "dockerImageHash":"${{ inputs.version || github.sha }}", "env_var": { "NUXT_PUBLIC_ALOKAI_MIDDLEWARE_CDN_CACHE_BUSTING_ID":"${{ inputs.version || github.sha }}", "NEXT_PUBLIC_ALOKAI_MIDDLEWARE_CDN_CACHE_BUSTING_ID":"${{ inputs.version || github.sha }}" }, "middlewareData":{ "path":"/api/", "port":4000, "has_base_path":false } }'
timeout: 60000

- name: Update deployment status (success)
Expand Down

0 comments on commit 6b8e137

Please sign in to comment.