<commit_before>name: Build Dev Docs

# on:
#   push:
#     branches:
#       - dev-docs-actions

on: 
  workflow_dispatch:
    inputs:
      build_reason:
        description: 'Why are you building the docs'     
        required: true
        default: 'To test it'

jobs:
  build-docs:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2 
      with:
          submodules: 'recursive'
    - name: Set up Python 
      uses: actions/setup-python@v2
      with:
          python-version: 3.7 
    - name: Build python-dp
      run: |
        wget https://github.com/bazelbuild/bazel/releases/download/2.1.0/bazel-2.1.0-installer-linux-x86_64.sh
        chmod +x bazel-2.1.0-installer-linux-x86_64.sh
        ./bazel-2.1.0-installer-linux-x86_64.sh --user
        export PATH=/github/home/bin:$PATH
        rm bazel-2.1.0-installer-linux-x86_64.sh
        pip install pipenv
        ./build_PyDP.sh
   
    - uses: ammaraskar/sphinx-action@master
      with:
        docs-folder: "docs/"
   
    # Publish built docs to gh-pages branch.
    # ===============================
    - name: Commit documentation changes
      run: |
        git clone https://github.com/ammaraskar/sphinx-action-test.git --branch gh-pages --single-branch gh-pages
        cp -r docs/_build/html/* gh-pages/
        cd gh-pages
        git config --local user.email "<EMAIL>"
        git config --local user.name "GitHub Action"
        git add .
        git commit -m "Update documentation" -a || true
        # The above command will fail if no changes were present, so we ignore
        # that.
    - name: Push changes
      uses: ad-m/github-push-action@master
      with:
        branch: gh-pages
        directory: gh-pages
        force: true
        github_token: ${{ secrets.GITHUB_TOKEN }}
    # ===============================<commit_msg>trigger on push. See if github actions trigger now.<commit_after>name: Build Dev Docs

on:
  push:
    branches:
      - dev-docs-actions

# on: 
#   workflow_dispatch:
#     inputs:
#       build_reason:
#         description: 'Why are you building the docs'     
#         required: true
#         default: 'To test it'

jobs:
  build-docs:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2 
      with:
          submodules: 'recursive'
    - name: Set up Python 
      uses: actions/setup-python@v2
      with:
          python-version: 3.7 
    - name: Build python-dp
      run: |
        wget https://github.com/bazelbuild/bazel/releases/download/2.1.0/bazel-2.1.0-installer-linux-x86_64.sh
        chmod +x bazel-2.1.0-installer-linux-x86_64.sh
        ./bazel-2.1.0-installer-linux-x86_64.sh --user
        export PATH=/github/home/bin:$PATH
        rm bazel-2.1.0-installer-linux-x86_64.sh
        pip install pipenv
        ./build_PyDP.sh
   
    - uses: ammaraskar/sphinx-action@master
      with:
        docs-folder: "docs/"
   
    # Publish built docs to gh-pages branch.
    # ===============================
    - name: Commit documentation changes
      run: |
        git clone https://github.com/ammaraskar/sphinx-action-test.git --branch gh-pages --single-branch gh-pages
        cp -r docs/_build/html/* gh-pages/
        cd gh-pages
        git config --local user.email "<EMAIL>"
        git config --local user.name "GitHub Action"
        git add .
        git commit -m "Update documentation" -a || true
        # The above command will fail if no changes were present, so we ignore
        # that.
    - name: Push changes
      uses: ad-m/github-push-action@master
      with:
        branch: gh-pages
        directory: gh-pages
        force: true
        github_token: ${{ secrets.GITHUB_TOKEN }}
    # ===============================
{'fraction_non_alphanumeric': 0.13998929336188437, 'fraction_numerical': 0.01873661670235546, 'mean_word_length': 1.9471608832807572, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1540642', 'n_tokens_mistral': 1278, 'n_tokens_neox': 1193, 'n_words': 288}