Skip to content

CD

CD #1525

Workflow file for this run

name: CD
on:
workflow_dispatch:
workflow_run:
workflows: [ "CI" ]
branches: [ master ]
types:
- completed
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
concurrency: production
environment:
name: Production
if: ${{ !github.event.repository.fork }}
env:
BOT_HOME_DIR: /home/csc
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- name: Copy infra directory
uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.SSH_PORT }}
source: .infra
target: ${{ env.BOT_HOME_DIR }}
overwrite: true
- name: Deploy CSZ Bot
uses: appleboy/ssh-action@25ce8cbbcb08177468c7ff7ec5cbfa236f9341e1
env:
BOT_HOME_DIR: ${{ env.BOT_HOME_DIR }}
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.SSH_PORT }}
envs: BOT_HOME_DIR
script: ${{ env.BOT_HOME_DIR }}/.infra/deploy.sh