Publish the website #27
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: Publish the website | |
on: workflow_dispatch | |
jobs: | |
docusaurus-deploy: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout the repo | |
uses: actions/checkout@v3 | |
- uses: actions/setup-java@v2 | |
with: | |
distribution: "adopt" | |
java-version: "17" | |
- name: Validate Gradle Wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Find Last Release | |
id: last_release | |
uses: InsonusK/get-latest-release@v1.0.1 | |
with: | |
myToken: ${{ github.token }} | |
view_top: 1 | |
- name: Build Docusaurus | |
run: ./gradlew replaceValuesDocusaurus -PLATEST_GITHUB_VERSION=${{ steps.last_release.outputs.tag_name }} --no-daemon --stacktrace | |
env: | |
GRADLE_OPTS: -Dkotlin.incremental=false -Dorg.gradle.jvmargs="-Xmx3g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:MaxMetaspaceSize=512m" | |
- name: Build Dokka | |
run: ./gradlew dokkaHtmlMultiModule --no-daemon --stacktrace | |
env: | |
GRADLE_OPTS: -Dkotlin.incremental=false -Dorg.gradle.jvmargs="-Xmx3g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:MaxMetaspaceSize=512m" | |
- name: Copy Dokka | |
run: | | |
mv build/dokka/htmlMultiModule website/static | |
- name: Publish website | |
run: | | |
git config --global user.email "kgalligan@gmail.com" | |
git config --global user.name "Kevin Galligan" | |
cd website | |
npm install | |
GIT_USER=ciuser GIT_PASS=${{ secrets.GITHUB_TOKEN }} yarn deploy |