Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[workflows] Fix preview deployment inactivation #843

Merged
merged 2 commits into from
Dec 10, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}
Loading