Skip to content

Commit aaafe6a

Browse files
authored
Merge pull request #336 from harawata/change-site-deploy
Change site deploy
2 parents 26c8454 + 2e26bf4 commit aaafe6a

File tree

2 files changed

+39
-5
lines changed

2 files changed

+39
-5
lines changed

.github/workflows/site.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Site
2+
3+
on:
4+
push:
5+
branches:
6+
- site
7+
8+
jobs:
9+
build:
10+
if: github.repository_owner == 'mybatis' && ! contains(toJSON(github.event.head_commit.message), '[maven-release-plugin]')
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Set up JDK
15+
uses: actions/setup-java@v3
16+
with:
17+
java-version: 21
18+
distribution: zulu
19+
- uses: webfactory/ssh-agent@master
20+
with:
21+
ssh-private-key: ${{ secrets.DEPLOY_KEY }}
22+
- name: Build site
23+
run: ./mvnw site site:stage -DskipTests -B -V --no-transfer-progress -Dlicense.skip=true
24+
env:
25+
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
- name: Deploy Site to gh-pages
28+
uses: JamesIves/[email protected]
29+
with:
30+
ssh-key: true
31+
branch: gh-pages
32+
folder: target/staging
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+

src/site/site.xml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
4-
Copyright 2010-2022 the original author or authors.
4+
Copyright 2010-2023 the original author or authors.
55
66
Licensed under the Apache License, Version 2.0 (the "License");
77
you may not use this file except in compliance with the License.
@@ -16,9 +16,8 @@
1616
limitations under the License.
1717
1818
-->
19-
<project xmlns="http://maven.apache.org/DECORATION/1.8.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20-
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.8.0 https://maven.apache.org/xsd/decoration-1.8.0.xsd"
21-
name="${project.name}">
19+
<site name="${project.name}" xmlns="http://maven.apache.org/SITE/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20+
xsi:schemaLocation="http://maven.apache.org/SITE/2.0.0 https://maven.apache.org/xsd/site-2.0.0.xsd">
2221

2322
<body>
2423

@@ -44,4 +43,4 @@
4443

4544
<menu ref="reports"/>
4645
</body>
47-
</project>
46+
</site>

0 commit comments

Comments
 (0)