From f4915c218f2b0fa3f2b3fc620b89525130d39cf0 Mon Sep 17 00:00:00 2001 From: Casper JB Date: Wed, 26 Nov 2025 00:22:44 +0000 Subject: [PATCH 1/2] Update workflow for STAFF server deployment now has an option for what branch to use, as staff server wont always use `main` --- .../workflows/update-and-restart-STAFF.yml | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/update-and-restart-STAFF.yml b/.github/workflows/update-and-restart-STAFF.yml index 2b4e616..a557eb8 100644 --- a/.github/workflows/update-and-restart-STAFF.yml +++ b/.github/workflows/update-and-restart-STAFF.yml @@ -1,8 +1,12 @@ -name: Manual Deploy +name: Update and restart STAFF server -# Trigger via actions tab on: workflow_dispatch: + inputs: + branch: + description: "Branch to deploy" + required: true + default: "main" permissions: contents: read @@ -15,6 +19,8 @@ jobs: # Step 1: Checkout the repository - name: Checkout repo uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.branch }} # Step 2: Connect to server via SSH and deploy - name: Deploy over SSH @@ -26,18 +32,13 @@ jobs: command_timeout: 10m script_stop: true script: | - - # Crash out on error set -e - - # CD to correct dir + cd /root/staff-server - # Ensure we are on the main branch - git checkout main - - # Pull changes from main - git pull origin main + # Check out the selected branch based on chosen branch + git fetch origin + git checkout "${{ github.event.inputs.branch }}" + git pull origin "${{ github.event.inputs.branch }}" - # Build and start container docker compose up --build --force-recreate --remove-orphans -d From f80dda05fad3f5b539693b530ce2d2c44155ae1b Mon Sep 17 00:00:00 2001 From: Casper JB Date: Wed, 26 Nov 2025 00:25:27 +0000 Subject: [PATCH 2/2] Update update-and-restart.yml --- .github/workflows/update-and-restart.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-and-restart.yml b/.github/workflows/update-and-restart.yml index 1452dc0..c400369 100644 --- a/.github/workflows/update-and-restart.yml +++ b/.github/workflows/update-and-restart.yml @@ -1,4 +1,4 @@ -name: Manual Deploy +name: Update And Deploy PRODUCTION server # Trigger via actions tab on: