Skip to content

Commit 4d1f111

Browse files
authored
Merge pull request #29 from hazendaz/master
Add site GHA and update git ignore
2 parents 57f5924 + 23e9fbe commit 4d1f111

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.github/workflows/site.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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@v4
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 }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/.project
22
target/
3+
.github/keys/

0 commit comments

Comments
 (0)