Skip to content

Commit

Permalink
deploy changes again
Browse files Browse the repository at this point in the history
  • Loading branch information
andromaqui committed Jun 18, 2024
1 parent b736ba9 commit d78cd9c
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions .github/workflows/preview-env-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,24 @@ jobs:
secret/data/products/camunda-docs/ci/preview-environment PREVIEW_ENV_BUCKET_NAME;
secret/data/products/camunda-docs/ci/preview-environment PREVIEW_ENV_GCLOUD_SA_KEY;
- name: Find env tear down comment
uses: peter-evans/find-comment@v1
id: find-teardown-comment
with:
issue-number: ${{ github.event.number }}
body-includes: Your preview env has been torn down.

- name: Update env tear down comment
if: steps.find-teardown-comment.outputs.comment-id != ''
uses: peter-evans/create-or-update-comment@v4
env:
BUCKET_NAME: ${{ steps.secrets.outputs.PREVIEW_ENV_BUCKET_NAME }}
with:
comment-id: ${{ steps.find-teardown-comment.outputs.comment-id }}
body: |
Preview environment has successfully been deployed. You can access it on https://${{ env.BUCKET_NAME }}/pr-${{ github.event.number }}/index.html.
edit-mode: replace

- name: Find deployment comment
uses: peter-evans/find-comment@v1
id: find-deployment-comment
Expand Down Expand Up @@ -63,7 +81,7 @@ jobs:
# If the deployment comment is found, remove the old static files from the bucket
# before uploading the new build
- name: Remove files from Google bucket from previous deployment
if: steps.find-deployment-comment.outputs.comment-id != ''
if: steps.find-deployment-comment.outputs.comment-id != '' && steps.find-teardown-comment.outputs.comment-id == ''
env:
BUCKET_NAME: ${{ steps.secrets.outputs.PREVIEW_ENV_BUCKET_NAME }}
run: |
Expand All @@ -85,22 +103,6 @@ jobs:
env: ${{ steps.deployment.outputs.env }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}

- name: Find env tear down comment
uses: peter-evans/find-comment@v1
id: find-teardown-comment
with:
issue-number: ${{ github.event.number }}
body-includes: Your preview env has been torn down.

- name: Update env tear down comment
if: steps.find-teardown-comment.outputs.comment-id != ''
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ steps.find-teardown-comment.outputs.comment-id }}
body: |
Your preview env has been torn down.
edit-mode: replace

- name: Create comment
if: steps.find-deployment-comment.outputs.comment-id == ''
uses: peter-evans/create-or-update-comment@v4
Expand Down

0 comments on commit d78cd9c

Please sign in to comment.