diff --git a/.github/workflows/site.yaml b/.github/workflows/site.yaml new file mode 100644 index 0000000..299c414 --- /dev/null +++ b/.github/workflows/site.yaml @@ -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 }} + diff --git a/src/site/site.xml b/src/site/site.xml index c6dd793..fc683b1 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -16,9 +16,8 @@ limitations under the License. --> - + @@ -27,4 +26,5 @@ - + +