Merge pull request #947 from hazendaz/master #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v4 | |
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/[email protected] | |
with: | |
ssh-key: true | |
branch: gh-pages | |
folder: target/staging | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |