name: Build (and deploy) documentation

on:
  pull_request:
    branches:
      master
  push:
    branches:
      master

jobs:
  docs:
    runs-on: ubuntu-20.04
    strategy:
      matrix:
        version:
          - latest
          - 0.2.5
    steps:
      - name: Set up python 3.9
        uses: actions/setup-python@v2
        with:
          python-version: 3.9

      - name: Checkout
        uses: actions/checkout@v2
        with:
          ref: ${{ matrix.version == latest && github.sha || matrix.version }}

      - name: Install requirements
        run: |
          pip install pip==21.3.1 setuptools==47.1.0 wheel==0.37.0
          pip install -r requirements/dev.txt

      - name: Build website
        run: |
          PYTHONPATH=. sphinx-build \
            -b html \
            -D version=${{ matrix.version }} \
            -D release=${{ matrix.version }} \
            docs \
            website/docs/${{ matrix.version }}

      - name: Publish documentation
        if: ${{ github.ref == refs/heads/master }}
        uses: peaceiris/actions-gh-pages@v3
        with:
          deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
          external_repository: pymanopt/pymanopt.github.io
          publish_branch: main
          publish_dir: website/docs/${{ matrix.version }}
          cname: www.pymanopt.org
          user_name: 'github-actions[bot]'
          user_email: 'github-actions[bot]@users.noreply.github.com'

name: Build (and deploy) documentation

on:
  pull_request:
    branches:
      master
  push:
    branches:
      master

jobs:
  docs:
    runs-on: ubuntu-20.04
    strategy:
      matrix:
        version:
          - latest
          - 0.2.5
    steps:
      - name: Set up python 3.9
        uses: actions/setup-python@v2
        with:
          python-version: 3.9

      - name: Checkout
        uses: actions/checkout@v2
        with:
          ref: ${{ matrix.version == "latest" && github.sha || matrix.version }}

      - name: Install requirements
        run: |
          pip install pip==21.3.1 setuptools==47.1.0 wheel==0.37.0
          pip install -r requirements/dev.txt

      - name: Build website
        run: |
          PYTHONPATH=. sphinx-build \
            -b html \
            -D version=${{ matrix.version }} \
            -D release=${{ matrix.version }} \
            docs \
            website/docs/${{ matrix.version }}

      - name: Publish documentation
        if: ${{ github.ref == refs/heads/master }}
        uses: peaceiris/actions-gh-pages@v3
        with:
          deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
          external_repository: pymanopt/pymanopt.github.io
          publish_branch: main
          publish_dir: website/docs/${{ matrix.version }}
          cname: www.pymanopt.org
          user_name: 'github-actions[bot]'
          user_email: 'github-actions[bot]@users.noreply.github.com'

Fix string literal in expression
Fix string literal in expression

Signed-off-by: Niklas Koep <342d5290239d9c5264c8f98185afedb99596601a@gmail.com>
