helma/.github/workflows/deploy.yml
Tobi Schäfer 3f2bf9c3dc
All checks were successful
Build / build (push) Successful in 31s
Simplify repository workflows
* Use deploy workflow for staging, too
* Reduce deploy.sh script
2025-05-25 17:05:05 +02:00

39 lines
893 B
YAML

name: Deploy
on:
workflow_dispatch:
inputs:
hostname:
description: Hostname
type: string
required: true
default: antville.org
jobs:
stage:
runs-on: antville
environment:
name: production
url: ${{ inputs.hostname }}
steps:
- uses: actions/checkout@v4
- name: Build with Gradle
run: ./gradlew installDist
- name: Copy build files to server
run: |
rsync ./build/install/helma/ ${{ inputs.hostname }}:./ \
--verbose --archive --delete --compress \
--filter '+ /bin' \
--filter '+ /extras' \
--filter '+ /launcher.jar' \
--filter '- /lib/ext' \
--filter '+ /lib' \
--filter '+ /modules' \
--filter '- /*'
- name: Restart Helma
run: ssh ${{ inputs.hostname }} restart