antville/.github/workflows/deploy.yml
Tobi Schäfer f25b3c0b76
Simplify repository workflows
Use deploy workflow for staging, too
2025-05-25 20:58:23 +02:00

48 lines
1.2 KiB
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 :build
- name: Copy files to server
run: |
rsync ./build/install/antville/ ${{ inputs.hostname }}:./apps/antville/ \
--archive --compress --delete --verbose \
--filter '+ /claustra' \
--filter '+ /code' \
--filter '+ /compat' \
--filter '+ /db' \
--filter '+ /i18n' \
--filter '+ /lib' \
--filter '- /*'
rsync ./build/install/antville/static/ ${{ inputs.hostname }}:./apps/antville/static/ \
--archive --compress --verbose \
--filter '+ /fonts' \
--filter '+ /formica.html' \
--filter '+ /img' \
--filter '+ /scripts' \
--filter '+ /styles' \
--filter '- /*'
- name: Restart Helma
run: ssh ${{ inputs.hostname }} restart