Skip to content

Commit d305632

Browse files
authored
Merge pull request #15 from Balatro-Multiplayer/Casjb-patch-4
Casjb patch 4
2 parents 1c36558 + f80dda0 commit d305632

2 files changed

Lines changed: 14 additions & 13 deletions

File tree

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
name: Manual Deploy
1+
name: Update and restart STAFF server
22

3-
# Trigger via actions tab
43
on:
54
workflow_dispatch:
5+
inputs:
6+
branch:
7+
description: "Branch to deploy"
8+
required: true
9+
default: "main"
610

711
permissions:
812
contents: read
@@ -15,6 +19,8 @@ jobs:
1519
# Step 1: Checkout the repository
1620
- name: Checkout repo
1721
uses: actions/checkout@v4
22+
with:
23+
ref: ${{ github.event.inputs.branch }}
1824

1925
# Step 2: Connect to server via SSH and deploy
2026
- name: Deploy over SSH
@@ -26,18 +32,13 @@ jobs:
2632
command_timeout: 10m
2733
script_stop: true
2834
script: |
29-
30-
# Crash out on error
3135
set -e
32-
33-
# CD to correct dir
36+
3437
cd /root/staff-server
3538
36-
# Ensure we are on the main branch
37-
git checkout main
38-
39-
# Pull changes from main
40-
git pull origin main
39+
# Check out the selected branch based on chosen branch
40+
git fetch origin
41+
git checkout "${{ github.event.inputs.branch }}"
42+
git pull origin "${{ github.event.inputs.branch }}"
4143
42-
# Build and start container
4344
docker compose up --build --force-recreate --remove-orphans -d

.github/workflows/update-and-restart.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Manual Deploy
1+
name: Update And Deploy PRODUCTION server
22

33
# Trigger via actions tab
44
on:

0 commit comments

Comments
 (0)