From f6668636a97de0f8e9450d6c9c8990796d7a045e Mon Sep 17 00:00:00 2001 From: tobi Date: Sat, 24 May 2025 19:25:08 +0000 Subject: [PATCH] Replace hard-coded hostname with input --- .github/workflows/stage.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/stage.yml b/.github/workflows/stage.yml index 17e693d4..94e991cf 100644 --- a/.github/workflows/stage.yml +++ b/.github/workflows/stage.yml @@ -1,6 +1,13 @@ name: Deploy (Staging) -on: workflow_dispatch +on: + workflow_dispatch: + inputs: + hostname: + description: Hostname + type: string + required: true + default: antville.org jobs: stage: @@ -8,7 +15,7 @@ jobs: environment: name: stage - url: ${{ vars.stage_url }} + url: ${{ inputs.hostname }} steps: - uses: actions/checkout@v4 @@ -16,9 +23,9 @@ jobs: - name: Build with Gradle run: ./gradlew installDist - - name: Publish to staging server + - name: Copy build files to server run: | - rsync ./build/install/helma/ staging-server:./ \ + rsync ./build/install/helma/ ${{ inputs.hostname }}:./ \ --verbose --archive --delete --compress \ --filter '+ /bin' \ --filter '+ /extras' \ @@ -29,4 +36,4 @@ jobs: --filter '- /*' - name: Restart Helma - run: ssh staging-server restart + run: ssh ${{ inputs.hostname }} restart