Initial pipeline
This commit is contained in:
38
.gitea/workflows/build.yml
Normal file
38
.gitea/workflows/build.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
name: Build Org Backend
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: build-site
|
||||
env:
|
||||
APP_HOME: /home/zaine/master-folder/projects/java_projects/org_backend
|
||||
SERVICE_NAME: org-backend.service
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Java
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: "17"
|
||||
|
||||
- name: Verify toolchain
|
||||
run: |
|
||||
java -version
|
||||
mvn -version
|
||||
|
||||
- name: Build and test
|
||||
run: mvn -B clean verify
|
||||
|
||||
- name: Deploy jar and restart service
|
||||
run: ./scripts/deploy-systemd.sh
|
||||
Reference in New Issue
Block a user