Skip to content

Commit

Permalink
Merge pull request #179 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 e244773 + c754d0a commit f3fe535
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 3 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/site.yaml
Original file line number Diff line number Diff line change
@@ -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 }}

7 changes: 4 additions & 3 deletions src/site/site.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
limitations under the License.
-->
<project name="${project.name}" 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 http://maven.apache.org/xsd/decoration-1.8.0.xsd">
<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 +27,5 @@
<menu ref="reports"/>
</body>

</project>
</site>

0 comments on commit f3fe535

Please sign in to comment.