Skip to content

Update box.iproto.override description #665

Update box.iproto.override description

Update box.iproto.override description #665

name: Destroy-deployments
# When a pull request is merged or just closed, remove deployed docs from the dev server
# and remove the GitHub deployment with the same name.
on:
pull_request:
types:
- closed
jobs:
destroy-deployment:
runs-on: ubuntu-latest
env:
# we only remove deployments from the test site, never from prod
TARANTOOL_UPDATE_URL: ${{secrets.TARANTOOL_DEVELOP_UPDATE_URL}}
TARANTOOL_UPDATE_KEY: ${{secrets.TARANTOOL_UPDATE_KEY}}
VKTEAMS_BOT_TOKEN: ${{secrets.VKTEAMS_TARANTOOLBOT_TOKEN}}
steps:
- uses: actions/checkout@v3
id: checkout
with:
token: "${{ secrets.GITHUB_TOKEN }}"
- name: Set deployment name from source branch
id: set-deployment-name
run: echo "DEPLOYMENT_NAME=${GITHUB_HEAD_REF##*/}" >> $GITHUB_ENV
- name: Remove dev server deployment with version ${{env.DEPLOYMENT_NAME}}
uses: nick-fields/retry@v2
id: delete-deployment-webhook
with:
command: bash webhooks/delete_deployment.sh
timeout_seconds: 30
retry_wait_seconds: 30
max_attempts: 3
- name: Remove GitHub deployment at branch-${{env.DEPLOYMENT_NAME}}
uses: bobheadxi/deployments@v1.3.0
# remove GH deployment even if webhook failed
if: always()
id: remove-github-deployment
with:
step: delete-env
token: ${{secrets.GITHUB_TOKEN}}
env: "branch-${{env.DEPLOYMENT_NAME}}"
- name: Send VK Teams message on failures
# bot token won't be accessible in the forks
if: ${{ failure() && env.VKTEAMS_BOT_TOKEN != '' }}
uses: tarantool/actions/report-job-status@master
with:
api-url: "https://api.internal.myteam.mail.ru/bot/v1/"
bot-token: ${{ env.VKTEAMS_BOT_TOKEN }}
chat-id: tt_docs_cicd_reports
job-steps: ${{ ToJson(steps) }}