Skip to content

Deploy Docker Image - Telegram Game #44

Deploy Docker Image - Telegram Game

Deploy Docker Image - Telegram Game #44

name: Deploy Docker Image - Telegram Game
on:
workflow_run:
workflows: ["Build and Push Docker"]
types:
- completed
workflow_dispatch:
env:
APP_URL: https://chatgame.space/game
APP_ENV: telegram-game-production
jobs:
deploy:
name: Deploy image
runs-on: ubuntu-latest
permissions:
deployments: write
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: chrnorm/deployment-action@v2
name: Create GitHub deployment
id: deployment
with:
token: '${{ github.token }}'
environment-url: ${{ env.APP_URL }}
environment: ${{ env.APP_ENV }}
- name: Restart service on Kosarev.Space
uses: kosarev-space/[email protected]
with:
auth_token: ${{ secrets.BEARER_TOKEN }}
service_id: ${{ secrets.TELEGRAM_GAME_SERVICE_ID }}
- name: Update deployment status (success)
if: success()
uses: chrnorm/deployment-status@v2
with:
token: '${{ github.token }}'
environment-url: ${{ steps.deployment.outputs.environment_url }}
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
state: 'success'
- name: Update deployment status (failure)
if: failure()
uses: chrnorm/deployment-status@v2
with:
token: '${{ github.token }}'
environment-url: ${{ steps.deployment.outputs.environment_url }}
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
state: 'failure'