name: Manually generate documentation

on:
  workflow_dispatch

permissions:
  contents: read
  pages: write
  id-token: write

concurrency:
  group: "update-standard-library-documentation"
  cancel-in-progress: true

jobs:
  generate-documentation:
    name: Generate documentation for release
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: ubuntu-latest
    container:
      image: ponylang/ponyc-ci-stdlib-builder:latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Build
        run: "bash .ci-scripts/build-stdlib-documentation.bash"
      - name: Setup Pages
        uses: actions/configure-pages@v2
      - name: Upload artifact
        uses: actions/upload-pages-artifact@v1
        with:
          path: 'stdlib-docs/site/'
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v1

name: Manually generate documentation

on:
  workflow_dispatch

permissions:
  contents: read
  pages: write
  id-token: write

concurrency:
  group: "update-standard-library-documentation"
  cancel-in-progress: true

jobs:
  generate-documentation:
    name: Generate documentation for release
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: ubuntu-latest
    container:
      image: ponylang/ponyc-ci-stdlib-builder:latest
    steps:
      - name: Install insiders theme
        run: pip install git+https://${MATERIAL_INSIDERS_ACCESS}@github.com/squidfunk/mkdocs-material-insiders.git
        env:
          MATERIAL_INSIDERS_ACCESS: ${{ secrets.MATERIAL_INSIDERS_ACCESS }}
      - name: Checkout
        uses: actions/checkout@v3
      - name: Build
        run: "bash .ci-scripts/build-stdlib-documentation.bash"
      - name: Setup Pages
        uses: actions/configure-pages@v2
      - name: Upload artifact
        uses: actions/upload-pages-artifact@v1
        with:
          path: 'stdlib-docs/site/'
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v1

Use mkdocs-material-insiders theme when manually building stdlib documentation
Use mkdocs-material-insiders theme when manually building stdlib documentation

This is a stepping stone to having private images that are for ponylang org
only usage for building our various bits of documentation that contain the
theme in addition to images for public consumption that don't contain the
insiders theme.

If this test works out, I'll start working on rolling out.
