Skip to content

[Doc][M] Publish

[Doc][M] Publish #38

name: "[Doc][M] Publish"
on:
workflow_dispatch:
jobs:
build_and_publish_doc_site:
if: github.ref != 'refs/heads/gh-pages' && github.ref != 'gh-pages'
runs-on: ubuntu-latest
strategy:
matrix:
scala:
- { version: "3.1.3", binary-version: "3", java-version: "17", java-distribution: "temurin" }
node:
- { version: "18.13.0" }
steps:
- uses: actions/[email protected]
- uses: actions/setup-java@v4
with:
java-version: ${{ matrix.scala.java-version }}
distribution: ${{ matrix.scala.java-distribution }}
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node.version }}
registry-url: 'https://registry.npmjs.org'
- name: Cache SBT
uses: actions/[email protected]
with:
path: |
~/.ivy2/cache
~/.cache/coursier
~/.sbt
key: ${{ runner.os }}-sbt-${{ matrix.scala.binary-version }}-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('**/build.properties') }}
restore-keys: |
${{ runner.os }}-sbt-${{ matrix.scala.binary-version }}-
- 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: Build and publish 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 }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
sbt \
++${{ matrix.scala.version }}! \
docs/clean \
docs/mdoc \
docs/docusaurGenerateAlgoliaConfigFile \
docs/docusaurGenerateGoogleAnalyticsConfigFile \
docs/docusaurInstall \
docs/docusaurCleanBuild \
docs/docusaurBuild \
docs/publishToGitHubPages