Skip to content

Commit

Permalink
Replaced Travis for GitHub Actions to new repo
Browse files Browse the repository at this point in the history
  • Loading branch information
CdeJong committed Jun 17, 2024
1 parent 7dae495 commit aa24a39
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 19 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build and Deploy

on:
push:
branches:
- master

jobs:
build_and_test:
if: github.repository_owner == 'onestorm-net'
runs-on: ubuntu-latest
steps:
# Setup
- name: Checkout repository
uses: actions/checkout@v4
- name: JDK 16
uses: actions/setup-java@v4
with:
java-version: '16'
distribution: 'adopt'
cache: 'maven'

# Build
- name: Build with Maven
run: mvn -U -B -e clean package deploy
# -U: --update-snapshots
# -B: Runs Maven in non-interactive (batch) mode
# -e: Displays Maven execution errors only

# Deploy
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: ${{ secrets.SSH_KNOWN_HOST }}
- name: Rsync deploy maven repo
run: rsync -r --quiet target/mvn-repo/ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/home/web/www/repo.onestorm.net/public/repository/maven-public/
- name: Rsync deploy final artifact
run: rsync -r --quiet --mkpath target/SuperpickaxeReloaded-*.jar ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/home/web/www/repo.onestorm.net/public/downloads/SuperpickaxeReloaded/
19 changes: 0 additions & 19 deletions scripts/deploy-release.sh

This file was deleted.

0 comments on commit aa24a39

Please sign in to comment.