<commit_before>name: Python package

on: [release]

jobs:

  documents:
    strategy:
      max-parallel: 4
      matrix:
        python-version: [3.7]

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@master
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v1
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip setuptools
        python -m pip install -r requirements/docs.txt
    - name: Deploy documents
      env:
        GH_TOKEN: ${{ secrets.GH_DEPLOY_KEY }}
        GH_USER: ${{ secrets.GH_USER }}
        GH_EMAIL: ${{ secrets.GH_EMAIL }}
      run: |
        git config user.name ${GH_USER}
        git config user.email "${GH_EMAIL}"
        git remote add gh-token "https://${GH_TOKEN}@github.com/facelessuser/wcmatch.git"
        git fetch gh-token && git fetch gh-token gh-pages:gh-pages
        python -m mkdocs gh-deploy -v --clean --remote-name gh-token
        git push gh-token gh-pages

  wheel:
    strategy:
      matrix:
        python-version: [3.7]

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@master
      - uses: actions/setup-python@v1
        with:
          python-version: ${{ matrix.python-version }}
      - name: Package
        run: |
          pip install --upgrade setuptools wheel
          python setup.py bdist_wheel
      - name: Publish
        uses: pypa/gh-action-pypi-publish@master
        with:
          user: __token__
          password: ${{ secrets.PYPI_PWD }}

  sdist:
    strategy:
      matrix:
        python-version: [3.7]

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@master
      - uses: actions/setup-python@v1
        with:
          python-version: ${{ matrix.python-version }}
      - name: Package
        run: |
          pip install --upgrade setuptools
          python setup.py sdist
      - name: Publish
        uses: pypa/gh-action-pypi-publish@master
        with:
          user: __token__
          password: ${{ secrets.PYPI_PWD }}
<commit_msg>Trigger deploy on tag creation instead of "release" and rename action<commit_after>name: Deploy

on:
  push:
    tags:
    - '*'

jobs:

  documents:
    strategy:
      max-parallel: 4
      matrix:
        python-version: [3.7]

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@master
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v1
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip setuptools
        python -m pip install -r requirements/docs.txt
    - name: Deploy documents
      env:
        GH_TOKEN: ${{ secrets.GH_DEPLOY_KEY }}
        GH_USER: ${{ secrets.GH_USER }}
        GH_EMAIL: ${{ secrets.GH_EMAIL }}
      run: |
        git config user.name ${GH_USER}
        git config user.email "${GH_EMAIL}"
        git remote add gh-token "https://${GH_TOKEN}@github.com/facelessuser/wcmatch.git"
        git fetch gh-token && git fetch gh-token gh-pages:gh-pages
        python -m mkdocs gh-deploy -v --clean --remote-name gh-token
        git push gh-token gh-pages

  wheel:
    strategy:
      matrix:
        python-version: [3.7]

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@master
      - uses: actions/setup-python@v1
        with:
          python-version: ${{ matrix.python-version }}
      - name: Package
        run: |
          pip install --upgrade setuptools wheel
          python setup.py bdist_wheel
      - name: Publish
        uses: pypa/gh-action-pypi-publish@master
        with:
          user: __token__
          password: ${{ secrets.PYPI_PWD }}

  sdist:
    strategy:
      matrix:
        python-version: [3.7]

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@master
      - uses: actions/setup-python@v1
        with:
          python-version: ${{ matrix.python-version }}
      - name: Package
        run: |
          pip install --upgrade setuptools
          python setup.py sdist
      - name: Publish
        uses: pypa/gh-action-pypi-publish@master
        with:
          user: __token__
          password: ${{ secrets.PYPI_PWD }}

{'fraction_non_alphanumeric': 0.11136783733826247, 'fraction_numerical': 0.0046210720887245845, 'mean_word_length': 1.8706896551724137, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3684032', 'n_tokens_mistral': 1405, 'n_tokens_neox': 1322, 'n_words': 324}