name: Publish the mkdocs to gh-pages

on:
  release:
    types: [published]

jobs:
  deploy-website:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout the repo
        uses: actions/checkout@v2

      - name: Prep mkdocs
        run: .github/workflows/prepare_mkdocs.sh

      - name: Deploy docs
        uses: mhausenblas/mkdocs-deploy-gh-pages@master
        env:
          PERSONAL_TOKEN: ${{ secrets.GH_CLIPPY_TOKEN }}

env:
  GRADLE_OPTS: -Dorg.gradle.configureondemand=true -Dorg.gradle.parallel=true -Dkotlin.incremental=false -Dorg.gradle.jvmargs="-Xmx3g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"

name: Publish the mkdocs to gh-pages

on:
  push:
    branches:
      - master

jobs:
  deploy-website:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout the repo
        uses: actions/checkout@v2

      - name: Prep mkdocs
        run: .github/workflows/prepare_mkdocs.sh

      - name: Deploy to GitHub Pages
        if: success()
        uses: crazy-max/ghaction-github-pages@v2
        with:
          target_branch: gh-pages
          build_dir: docs
        env:
          GITHUB_TOKEN: ${{ secrets.GH_CLIPPY_TOKEN }}

env:
  GRADLE_OPTS: -Dorg.gradle.configureondemand=true -Dorg.gradle.parallel=true -Dkotlin.incremental=false -Dorg.gradle.jvmargs="-Xmx3g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"

Deploy the website with proper pips installed
Deploy the website with proper pips installed
