Update: GitHub Actions with new actions/setup-java with its caching s… #405
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: "[Doc][A] Build Only" | |
on: | |
push: | |
branches: | |
- "**" | |
env: | |
GH_SBT_OPTS: "-Xss64m -Xms1024m -Xmx8G -XX:MaxMetaspaceSize=2G -XX:-UseGCOverheadLimit -XX:MaxInlineLevel=18 -XX:+UnlockExperimentalVMOptions" | |
GH_JVM_OPTS: "-Xss64m -Xms1024m -Xmx8G -XX:MaxMetaspaceSize=2G -XX:-UseGCOverheadLimit -XX:MaxInlineLevel=18 -XX:+UnlockExperimentalVMOptions" | |
jobs: | |
build-docusaurus: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
scala: | |
- { version: "3.3.3", binary-version: "3", java-version: "17", java-distribution: "temurin" } | |
node: | |
- { version: "18.13.0" } | |
steps: | |
- uses: actions/[email protected] | |
- uses: actions/[email protected] | |
with: | |
java-version: ${{ matrix.scala.java-version }} | |
distribution: ${{ matrix.scala.java-distribution }} | |
cache: 'sbt' | |
- uses: sbt/setup-sbt@v1 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node.version }} | |
registry-url: 'https://registry.npmjs.org' | |
- name: Cache npm | |
uses: actions/[email protected] | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ matrix.node.version }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node-${{ matrix.node.version }} | |
- name: Render markdown and build website | |
env: | |
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }} | |
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }} | |
ALGOLIA_INDEX_NAME: ${{ secrets.ALGOLIA_INDEX_NAME }} | |
GA_TRACKING_ID: ${{ secrets.GA_TRACKING_ID }} | |
GA_ANONYMIZE_IP: ${{ secrets.GA_ANONYMIZE_IP }} | |
JVM_OPTS: ${{ env.GH_JVM_OPTS }} | |
SBT_OPTS: ${{ env.GH_SBT_OPTS }} | |
run: | | |
sbt \ | |
++${{ matrix.scala.version }}! \ | |
docsV0/clean \ | |
docs/clean \ | |
docsV0/mdoc \ | |
docs/mdoc \ | |
docs/docusaurGenerateAlgoliaConfigFile \ | |
docs/docusaurGenerateGoogleAnalyticsConfigFile \ | |
docs/docusaurInstall \ | |
docs/docusaurCleanBuild \ | |
docs/docusaurBuild |