Skip to content

Commit

Permalink
Merge pull request #179 from hazendaz/master
Browse files Browse the repository at this point in the history
[GHA] Add site deploy script
  • Loading branch information
hazendaz committed Dec 27, 2023
2 parents 21cda27 + aff4337 commit cb23512
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/site.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
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 }}

0 comments on commit cb23512

Please sign in to comment.