Skip to content

Commit

Permalink
Merge pull request #173 from harawata/change-site-deploy
Browse files Browse the repository at this point in the history
change site deploy
  • Loading branch information
hazendaz committed Dec 5, 2023
2 parents d2479d2 + 318e79d commit ff478a0
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 4 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/site.yaml
@@ -0,0 +1,35 @@
name: Site

on:
push:
branches:
- site

jobs:
build:
if: github.repository_owner == 'mybatis' && ! contains(toJSON(github.event.head_commit.message), '[maven-release-plugin]')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 21
distribution: zulu
- uses: webfactory/ssh-agent@master
with:
ssh-private-key: ${{ secrets.DEPLOY_KEY }}
- name: Build site
run: ./mvnw site site:stage -DskipTests -B -V --no-transfer-progress -Dlicense.skip=true
env:
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy Site to gh-pages
uses: JamesIves/github-pages-deploy-action@v4.4.3
with:
ssh-key: true
branch: gh-pages
folder: target/staging
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

8 changes: 4 additions & 4 deletions src/site/site.xml
Expand Up @@ -16,9 +16,8 @@
limitations under the License.
-->
<project xmlns="http://maven.apache.org/DECORATION/1.8.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.8.0 https://maven.apache.org/xsd/decoration-1.8.0.xsd"
name="${project.name}">
<site name="${project.name}" xmlns="http://maven.apache.org/SITE/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SITE/2.0.0 https://maven.apache.org/xsd/site-2.0.0.xsd">

<body>
<menu name="Reference Documentation">
Expand All @@ -27,4 +26,5 @@

<menu ref="reports"/>
</body>
</project>
</site>

0 comments on commit ff478a0

Please sign in to comment.