Skip to content

preview deployment #215

preview deployment

preview deployment #215

Workflow file for this run

name: preview deployment
on:
workflow_run:
workflows: ["docker image"]
types:
- completed
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
deployment:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
name: deployment to preview environment
runs-on: ubuntu-latest
environment: ${{ vars.DEPLOY_ENV }}
steps:
- name: ssh
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
port: ${{ secrets.SSH_PORT }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_KEY }}
script: ${{ vars.DEPLOY_SCRIPT }}
- name: Send Discord notification
uses: appleboy/discord-action@master
with:
webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
args: Deployment complete.