Skip to content

Add option to rewrite document if exists #76

Add option to rewrite document if exists

Add option to rewrite document if exists #76

Workflow file for this run

name: Dokumenttipalvelu
on:
workflow_dispatch:
push:
paths-ignore:
- '**.md'
jobs:
test-and-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'temurin'
- uses: szenius/[email protected]
with:
timezoneLinux: "Europe/Helsinki"
- name: Build with Maven
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ github.token }}
run: mvn clean package -B
- uses: actions/cache@v2
id: restore-build
with:
path: |
target
key: ${{ github.sha }}
deploy-jar-library:
needs: test-and-build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
id: restore-build
with:
path: |
target
key: ${{ github.sha }}
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'temurin'
- name: Deploy jar library
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/OK-566'
shell: bash
env:
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
run: |
git clone https://github.com/Opetushallitus/ci-tools.git
source ci-tools/common/setup-tools.sh
mvn deploy -pl fi.vm.sade.dokumenttipalvelu:dokumenttipalvelu -DskipTests --settings ci-tools/common/maven-settings.xml