forked from internetpolice-eu/SuperpickaxeReloaded
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replaced Travis for GitHub Actions to new repo
- Loading branch information
Showing
2 changed files
with
39 additions
and
19 deletions.
There are no files selected for viewing
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
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/ |
This file was deleted.
Oops, something went wrong.