Skip to content

Staging deploy

Staging deploy #83

name: Staging deploy
on:
workflow_dispatch:
workflow_run:
workflows: ["Tests"]
branches: [main]
types:
- completed
jobs:
deploy:
name: Deploy to staging server
runs-on: [self-hosted, innosport]
environment:
name: staging
url: ${{ vars.DEPLOY_URL }}
steps:
- name: Deploy via SSH
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_KEY }}
command_timeout: 30m
script: |
cd "${{ secrets.DEPLOY_DIRECTORY }}"
bash "${{ secrets.DEPLOY_SCRIPT }}" "${{ github.ref_name }}"