Replace hard-coded hostname with input
This commit is contained in:
parent
1001b3b503
commit
f6668636a9
1 changed files with 12 additions and 5 deletions
17
.github/workflows/stage.yml
vendored
17
.github/workflows/stage.yml
vendored
|
@ -1,6 +1,13 @@
|
||||||
name: Deploy (Staging)
|
name: Deploy (Staging)
|
||||||
|
|
||||||
on: workflow_dispatch
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
hostname:
|
||||||
|
description: Hostname
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
default: antville.org
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
stage:
|
stage:
|
||||||
|
@ -8,7 +15,7 @@ jobs:
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
name: stage
|
name: stage
|
||||||
url: ${{ vars.stage_url }}
|
url: ${{ inputs.hostname }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
@ -16,9 +23,9 @@ jobs:
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
run: ./gradlew installDist
|
run: ./gradlew installDist
|
||||||
|
|
||||||
- name: Publish to staging server
|
- name: Copy build files to server
|
||||||
run: |
|
run: |
|
||||||
rsync ./build/install/helma/ staging-server:./ \
|
rsync ./build/install/helma/ ${{ inputs.hostname }}:./ \
|
||||||
--verbose --archive --delete --compress \
|
--verbose --archive --delete --compress \
|
||||||
--filter '+ /bin' \
|
--filter '+ /bin' \
|
||||||
--filter '+ /extras' \
|
--filter '+ /extras' \
|
||||||
|
@ -29,4 +36,4 @@ jobs:
|
||||||
--filter '- /*'
|
--filter '- /*'
|
||||||
|
|
||||||
- name: Restart Helma
|
- name: Restart Helma
|
||||||
run: ssh staging-server restart
|
run: ssh ${{ inputs.hostname }} restart
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue