minecraft-helper/.gitea/workflows/ci.yml

51 lines
1.2 KiB
YAML
Raw Normal View History

2024-04-10 09:53:58 +01:00
name: Deploy App
2024-04-06 05:55:48 +01:00
on:
push:
2024-04-10 09:53:58 +01:00
branches: ["master"]
paths-ignore:
- .gitignore
- README.md
- LICENSE
- docker-compose.yml
2024-04-06 05:55:48 +01:00
jobs:
2024-04-10 09:53:58 +01:00
docker:
strategy:
matrix:
arch: ["ubuntu-latest"]
git-version: ["2.44.0"]
java-version: ["17"]
maven-version: ["3.8.5"]
runs-on: ${{ matrix.arch }}
# Steps to run
2024-04-06 05:55:48 +01:00
steps:
2024-04-10 09:53:58 +01:00
# Checkout the repo
- name: Checkout
2024-04-06 05:55:48 +01:00
uses: actions/checkout@v4
2024-04-10 09:53:58 +01:00
# Setup Java and Maven
- name: Set up JDK and Maven
uses: s4u/setup-maven-action@v1.14.0
2024-04-08 07:20:25 +01:00
with:
2024-04-10 09:53:58 +01:00
java-version: ${{ matrix.java-version }}
distribution: "zulu"
maven-version: ${{ matrix.maven-version }}
2024-04-08 07:20:25 +01:00
2024-04-10 09:53:58 +01:00
# Run JUnit Tests
2024-04-08 07:20:25 +01:00
- name: Run Tests
2024-04-08 07:33:14 +01:00
run: mvn --batch-mode test -q
2024-04-08 07:20:25 +01:00
2024-04-10 09:53:58 +01:00
# Re-checkout to reset the FS before deploying to Dokku
- name: Checkout - Reset FS
2024-04-08 20:01:06 +01:00
uses: actions/checkout@v4
with:
fetch-depth: 0
2024-04-10 09:53:58 +01:00
# Deploy to Dokku
2024-04-06 05:55:48 +01:00
- name: Push to dokku
uses: dokku/github-action@master
with:
2024-04-06 19:33:29 +01:00
git_remote_url: "ssh://dokku@10.0.50.137:22/minecraft-helper"
2024-04-06 05:55:48 +01:00
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}