-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
57 lines (57 loc) · 1.58 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: 'Maven site deployment'
description: 'Deploy a Maven site'
author: 'Bernardo Mart�nez Garrido'
branding:
icon: 'book-open'
color: 'green'
inputs:
host:
description: 'Host where the site will be deployed'
required: true
url:
description: 'URL to deploy the site'
required: true
username:
description: 'Username for deploying'
required: true
password:
description: 'Password for deploying'
required: true
jdk:
description: 'JDK version to use'
default: '11'
required: false
profile:
description: 'Maven profile for site deployment'
default: 'deployment-site'
required: false
runs:
using: 'composite'
steps:
- name: Register SSH host
uses: bernardo-mg/ssh-host-register-action@v1
with:
host: ${{ inputs.host }}
- name: Check-out
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up JDK ${{ inputs.jdk }}
uses: actions/setup-java@v4
with:
java-version: ${{ inputs.jdk }}
distribution: 'temurin'
cache: 'maven'
- name: Set up Maven settings for site deployment
uses: bernardo-mg/maven-site-deployment-settings-action@v1
with:
username: ${{ inputs.username }}
password: ${{ inputs.password }}
siteUrl: ${{ inputs.url }}
fileName: site_settings.xml
- name: Generate docs
run: mvn verify site -B -P ${{ inputs.profile }}
shell: bash
- name: Deploy docs
run: mvn site:deploy -B -P ${{ inputs.profile }} -DskipTests --settings site_settings.xml
shell: bash