Skip to content

Deploy (Staging)

Deploy (Staging) #34

Workflow file for this run

name: Deploy (Staging)
on: workflow_dispatch
jobs:
stage:
runs-on: ubuntu-latest
environment:
name: stage
url: https://antville-test.online
steps:
- uses: actions/checkout@v4
- name: Set up SSH agent
uses: ./.github/actions/ssh
with:
config: ${{ vars.SSH_CONFIG }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
known-hosts: ${{ vars.SSH_KNOWN_HOSTS }}
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build with Gradle
run: ./gradlew installDist
- name: Publish to staging server
run: |
rsync ./build/install/helma/ staging-server:./ \
--verbose --archive --delete --compress \
--filter '+ /bin' \
--filter '+ /extras' \
--filter '+ /launcher.jar' \
--filter '- /lib/ext' \
--filter '+ /lib' \
--filter '+ /modules' \
--filter '- /*'
- name: Restart Helma
run: ssh staging-server restart