Deploy (Staging) #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy (Staging) | |
on: workflow_dispatch | |
jobs: | |
stage: | |
runs-on: ubuntu-latest | |
environment: | |
name: stage | |
url: https://antville-test.click | |
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 |