Skip to content

Commit

Permalink
Fix deployments inactivate
Browse files Browse the repository at this point in the history
  • Loading branch information
goruha committed Dec 10, 2024
1 parent 36a595e commit 6351f50
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/website-preview-destroy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,19 @@ jobs:
PR_HEAD: ${{ github.head_ref }}
run: echo "##[set-output name=branch;]$(echo ${PR_HEAD#refs/heads/} | tr / -)"

- name: mark environment as deactivated
uses: bobheadxi/deployments@648679e8e4915b27893bd7dbc35cb504dc915bc8 # v1
- name: Seek deployment
uses: cloudposse/[email protected]
id: deployment
with:
step: deactivate-env
env: preview
override: false
environment: preview
github-token: ${{ github.token }}
ref: ${{ steps.get_branch.outputs.branch }}
desc: Environment was pruned
status: success

- name: Inactivate deployment
uses: chrnorm/deployment-status@9a72af4586197112e0491ea843682b5dc280d806 # v2.0.3
if: ${{ steps.deployment.outputs.id != '' }}
with:
state: inactive
token: ${{ github.token }}
deployment-id: ${{ steps.deployment.outputs.id }}

0 comments on commit 6351f50

Please sign in to comment.