Skip to content

ci: restart the gaming server every day at 5am #9

ci: restart the gaming server every day at 5am

ci: restart the gaming server every day at 5am #9

name: Continuous Deployment
on:
push:
branches: [main]
env:
VPS_GAMESERVER_BINARY: ${{ secrets.VPS_GAMESERVER_BINARY }}
VPS_GAMESERVER_CONFIG_AMX_ADMINS: ${{ vars.VPS_GAMESERVER_CONFIG_AMX_ADMINS }}
VPS_GAMESERVER_CONFIG_DOWNLOAD_URL: ${{ vars.VPS_GAMESERVER_CONFIG_DOWNLOAD_URL }}
VPS_GAMESERVER_CONFIG_HOSTNAME: ${{ vars.VPS_GAMESERVER_CONFIG_HOSTNAME }}
VPS_GAMESERVER_CONFIG_MAX_PLAYERS: ${{ vars.VPS_GAMESERVER_CONFIG_MAX_PLAYERS }}
VPS_GAMESERVER_CONFIG_RCON_PASSWORD: ${{ secrets.VPS_GAMESERVER_CONFIG_RCON_PASSWORD }}
VPS_GAMESERVER_OPENSSH_ID: ${{ secrets.VPS_GAMESERVER_OPENSSH_ID }}
VPS_GAMESERVER_OPENSSH_PRIVATE_KEY: ${{ secrets.VPS_GAMESERVER_OPENSSH_PRIVATE_KEY }}
VPS_GAMESERVER_RSYNC_DEST_PATH: ${{ secrets.VPS_GAMESERVER_RSYNC_DEST_PATH }}
VPS_GAMESERVER_RSYNC_SOURCE_PATH: ${{ secrets.VPS_GAMESERVER_RSYNC_SOURCE_PATH }}
VPS_GAMESERVER_USERNAME: ${{ secrets.VPS_GAMESERVER_USERNAME }}
VPS_HOSTNAME: ${{ secrets.VPS_HOSTNAME }}
jobs:
deploy-gaming-server-files:
name: Deploy the gaming server files
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Deploy the gaming server files
uses: ./.github/actions/continuous-deployment/deploy-gaming-server-files
restart-gaming-server:
name: Restart the gaming server
runs-on: ubuntu-latest
needs: [deploy-gaming-server-files]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Restart the gaming server
uses: ./.github/actions/_shared/restart-gaming-server