This repository has been archived on 2024-09-09. You can view files and clone it, but cannot push or open issues or pull requests.
learningpulse/.forgejo/workflows/build_deploy_dev copy.yml
2005 5a21b908f8
All checks were successful
Mirror dev branch to remote / build (push) Successful in 13s
actions: only try to build images if server changed
2024-09-07 20:23:43 +02:00

55 lines
1.3 KiB
YAML

name: Build docker images, publish them, deploy to test server
on:
push:
branches: ["master"]
paths:
- server/**
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Restore cached Primes
id: maven-cache-restore
uses: https://github.com/actions/cache/restore@v4
with:
key: linux-maven
path: ~/.m2/repository
- uses: https://github.com/actions/checkout@v4
with:
repository: 'learningpulse/learningpulse'
ref: 'master'
token: '${{ secrets.token }}'
- name: 'Set up java 22'
uses: https://github.com/actions/setup-java@v4
with:
java-version: "22"
distribution: "temurin"
cache: maven
- name: Setup maven
if: steps.maven-cache.outputs.cache-hit != 'true'
uses: https://github.com/stCarolas/setup-maven@v5
with:
maven-version: 3.9.6
- name: Build with Maven
run: |
cd server && \
mvn -Dtoken=${{ secrets.token }} clean compile jib:build -e
- name: Cache local Maven repository
uses: https://github.com/actions/cache/save@v4
id: maven-cache-save
with:
path: ~/.m2/repository
key: linux-maven
restore-keys: |
linux-maven