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

55 lines
1.3 KiB
YAML
Raw Permalink Normal View History

2024-09-05 17:50:27 +02:00
name: Build docker images, publish them, deploy to test server
on:
push:
2024-09-05 17:51:36 +02:00
branches: ["master"]
paths:
- server/**
2024-09-05 17:50:27 +02:00
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:
2024-09-05 17:59:43 +02:00
repository: 'learningpulse/learningpulse'
ref: 'master'
2024-09-05 17:50:27 +02:00
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
2024-09-07 20:19:50 +02:00
run: |
cd server && \
mvn -Dtoken=${{ secrets.token }} clean compile jib:build -e
2024-09-05 17:50:27 +02:00
- 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