<commit_before>name: docs

on:
  push:	
    branches:	
      - master

jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/setup-python@v1
      with:
        python-version: '3.x'
    - name: Checkout
      uses: actions/checkout@v1
    - name: Build Docs
      run: |
        python ./.scripts/make_docs.py ./X2WOTCCommunityHighlander/Src/ ./X2WOTCCommunityHighlander/Config/ --outdir ./mkdocs
        pip install mkdocs
        cd mkdocs
        mkdocs build -d ../target
    - name: Deploy
      uses: crazy-max/ghaction-github-pages@v1
      with:
        target_branch: gh-pages
        build_dir: target # The folder the action should deploy.
        committer_name: X2CommunityCore-Docs-Bot
      env:
        GITHUB_PAT: ${{ secrets.ACCESS_TOKEN }}<commit_msg>Trigger docs build (but not deploy) on pr pushes as well<commit_after>name: docs

on: [push, pull_request]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/setup-python@v1
      with:
        python-version: '3.x'
    - name: Checkout
      uses: actions/checkout@v1
    - name: Build Docs
      run: |
        python ./.scripts/make_docs.py ./X2WOTCCommunityHighlander/Src/ ./X2WOTCCommunityHighlander/Config/ --outdir ./mkdocs
        pip install mkdocs
        cd mkdocs
        mkdocs build -d ../target
    - name: Upload the built docs
      uses: actions/upload-artifact@v1
      with:
        name: docs-html
        path: target

  deploy:
    runs-on: ubuntu-latest
    needs: build
    if: github.event == 'push' && github.ref == 'master'
    steps:
    - name: Get the built docs
      uses: actions/download-artifact@v1
      with:
        name: docs-html
        path: target
    - name: Deploy
      uses: crazy-max/ghaction-github-pages@v1
      with:
        target_branch: gh-pages
        build_dir: target # The folder the action should deploy.
        committer_name: X2CommunityCore-Docs-Bot
      env:
        GITHUB_PAT: ${{ secrets.ACCESS_TOKEN }}
{'fraction_non_alphanumeric': 0.1016016016016016, 'fraction_numerical': 0.008008008008008008, 'mean_word_length': 2.0801232665639446, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2101830', 'n_tokens_mistral': 682, 'n_tokens_neox': 647, 'n_words': 162}