Skip to content

Commit

Permalink
Merge pull request #915 from hazendaz/master
Browse files Browse the repository at this point in the history
[GHA] Add 'site.yaml' to release the site
  • Loading branch information
hazendaz authored Nov 19, 2023
2 parents fa5da10 + c1bb560 commit c8826e6
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/[email protected]
with:
ssh-key: true
branch: gh-pages
folder: target/staging
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit c8826e6

Please sign in to comment.