-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (35 loc) · 1.26 KB
/
maven-deploy.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
# Deploy snapshots to Sonatype OSS repository and deploy site to GitHub Pages
name: Deploy
concurrency: ${{ github.workflow }}
on:
push:
branches:
- develop
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Configure GIT
run: |
git config --global user.email "${{ secrets.GH_SITE_DEPLOY_EMAIL }}"
git config --global user.name "${{ secrets.GH_SITE_DEPLOY_NAME }}"
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
cache: maven
- name: Build, verify, deploy, generate site
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
run: mvn -s ./.maven-settings.xml -Pcontinuous-integration -B -U clean deploy site
- name: Stage and deploy site
run: >
mvn -s ./.maven-settings.xml -Pcontinuous-integration -B site:stage scm-publish:publish-scm
-Dscmpublish.checkinComment="Maven site: ${{ github.repository }}"
-Dusername=${{ secrets.GH_SITE_DEPLOY_USERNAME }}
-Dpassword=${{ secrets.GH_SITE_DEPLOY_PAT }}