<commit_before>name: Upload docs to GitHub Pages

on:
  push:
    # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore
    # "If you define both branches/branches-ignore and paths, the workflow will
    #  only run when both filters are satisfied."
    branches:
      - master
      - docs-overhaul
    paths:
      - "docs/**"
      - ".github/workflows/upload-docs.yml"
  pull_request:
    paths:
      - "docs/**"
      - ".github/workflows/upload-docs.yml"

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - name: Create faux requirements.txt file for caching sphinx pip pkg
        # Need to upgrade pygments as well since the version shipped with GH
        # actions default env is outdated and errors with a missing markdown
        # lexer
        run: echo -e "sphinx\npygments" > sphinx-requirements.txt

      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}
          cache: 'pip'
          # Use file created on-the-fly to cache sphinx pip pkg
          cache-dependency-path: 'sphinx-requirements.txt'

      - name: Install sphinx python package from pip
        run: pip install -U -r sphinx-requirements.txt

      - name: Build docs
        run: make site

      - name: Deploy
        uses: peaceiris/actions-gh-pages@v3
        with:
          deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
          external_repository: isso-comments/isso-comments.github.io
          publish_branch: gh-pages
          publish_dir: ./docs/_build/html
          cname: "isso-comments.de"<commit_msg>.github: upload-docs: Generate and copy API docs<commit_after>name: Upload docs to GitHub Pages

on:
  push:
    # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore
    # "If you define both branches/branches-ignore and paths, the workflow will
    #  only run when both filters are satisfied."
    branches:
      - master
      - docs-overhaul
    paths:
      - "docs/**"
      - ".github/workflows/upload-docs.yml"
  pull_request:
    paths:
      - "docs/**"
      - ".github/workflows/upload-docs.yml"

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - name: Create faux requirements.txt file for caching sphinx pip pkg
        # Need to upgrade pygments as well since the version shipped with GH
        # actions default env is outdated and errors with a missing markdown
        # lexer
        run: echo -e "sphinx\npygments" > sphinx-requirements.txt

      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}
          cache: 'pip'
          # Use file created on-the-fly to cache sphinx pip pkg
          cache-dependency-path: 'sphinx-requirements.txt'

      - name: Install sphinx python package from pip
        run: pip install -U -r sphinx-requirements.txt

      - name: Build docs
        run: make site

      - name: Set up NodeJS
        uses: actions/setup-node@v2
        with:
          node-version: 16

      - name: Generate API docs
        run: make apidoc-init apidoc

      - name: Copy API docs to docs/ dir
        run: cp -r apidoc/_output/ docs/_build/html/docs/api

      - name: Deploy
        uses: peaceiris/actions-gh-pages@v3
        with:
          deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
          external_repository: isso-comments/isso-comments.github.io
          publish_branch: gh-pages
          publish_dir: ./docs/_build/html
          cname: "isso-comments.de"
{'fraction_non_alphanumeric': 0.0959119496855346, 'fraction_numerical': 0.0023584905660377358, 'mean_word_length': 2.210260723296888, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3496688', 'n_tokens_mistral': 1216, 'n_tokens_neox': 1129, 'n_words': 312}