Merge pull request #130 from gudzpoz/ndk-upgrade #54
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
# Modified from https://github.com/libgdx/libgdx/blob/master/.github/workflows/build-publish.yml | |
name: Build Documentation | |
on: | |
workflow_dispatch: | |
branches: | |
- main | |
push: | |
paths: | |
- 'docs/**' | |
branches: | |
- main | |
jobs: | |
documentation: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '11' | |
- name: Cache Gradle packages | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Build | |
run: | | |
export export NDK_HOME=$ANDROID_NDK_HOME | |
./gradlew jniGen | |
- name: All Javadoc | |
run: | | |
./gradlew allJavadoc | |
- name: Moving Javadoc | |
run: | | |
mv build/docs/javadoc docs/.vuepress/public/ | |
- name: Setup PNPM | |
uses: pnpm/[email protected] | |
with: | |
version: 7.3.0 | |
run_install: false | |
- name: Build VuePress | |
run: | | |
cd docs | |
pnpm install | |
pnpm docs:build | |
- name: Deploy | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: docs/.vuepress/dist | |
- name: Cleanup Gradle Cache | |
run: | | |
rm -f ~/.gradle/caches/modules-2/modules-2.lock | |
rm -f ~/.gradle/caches/modules-2/gc.properties |