Skip to content

Deploy Leaderboard Worker to VPS #7

Deploy Leaderboard Worker to VPS

Deploy Leaderboard Worker to VPS #7

Workflow file for this run

name: Deploy Leaderboard Worker to VPS
on:
workflow_run:
workflows: ["Leaderboard Worker GHCR Image"]
types:
- completed
branches:
- main
workflow_dispatch:
permissions:
contents: read
jobs:
deploy:
name: Deploy to VPS
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
timeout-minutes: 10
env:
VPS_HOST: ${{ secrets.VPS_HOST }}
VPS_USER: ${{ secrets.VPS_USER }}
VPS_SSH_KEY: ${{ secrets.VPS_SSH_KEY }}
VPS_SSH_PORT: ${{ secrets.VPS_SSH_PORT || '22' }}
steps:
- name: Deploy via SSH
if: ${{ env.VPS_HOST != '' && env.VPS_USER != '' && env.VPS_SSH_KEY != '' }}
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ env.VPS_HOST }}
username: ${{ env.VPS_USER }}
key: ${{ env.VPS_SSH_KEY }}
port: ${{ env.VPS_SSH_PORT }}
script: |
cd ~/projects/DevImpact || cd /app || exit 1
bash ops/deploy/deploy-leaderboard.sh