Update githut actions versions. #5
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
name: Java CI | |
on: | |
push: | |
paths-ignore: | |
- 'docs/**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 📂 | |
uses: actions/checkout@v4 | |
- name: Set up JDK 11 ⚙️ | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'zulu' | |
java-version: '11' | |
- name: Cache Maven packages ⛓️ | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Build with Maven 🔧 | |
run: mvn --batch-mode --update-snapshots verify -fae | |
- name: Deploy 🚀 | |
if: github.ref == 'refs/heads/master' | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: releng/com.obeonetwork.mbse.capella.vpx.site/target/repository | |
target-folder: nightly | |
single-commit: true # Remove history in gh-pages | |
clean: true # Remove deprecated files | |
- name: Get the tag version 🏷️ | |
id: get_version | |
run: echo "TAG_VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT | |
- name: Deploy Release 🚀🏷️ | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: releng/com.obeonetwork.mbse.capella.vpx.site/target/repository | |
target-folder: releases/${{ steps.get_version.outputs.TAG_VERSION }} | |
single-commit: true # Remove history in gh-pages | |
clean: true # Remove deprecated files |