<commit_before>name: Publish Navitia Documentation

on:
  pull_request:
  push:
    branches:
      - dev
      - release


jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1
    - name: install bundle
      run:  sudo apt install -y bundler
    - name: install httpie dependency
      run: sudo apt install -y httpie
    - name: git checkout on dev
      run: git checkout dev
    - name: generate documentation on dev
      working-directory: documentation/slate
      run: |
        rm -f Gemfile.lock
        sudo gem update --default
        bundle install
        bundle exec middleman build
        rm -fr /tmp/job_documentation_publish_slate
        mkdir -p /tmp/job_documentation_publish_slate
        mv build /tmp/job_documentation_publish_slate
    - name: move new documentation on gh-pages
      run: |
        rm -f documentation/slate/Gemfile.lock
        git fetch origin gh-pages:gh-pages
        git checkout gh-pages
        rm -fr *
        mv /tmp/job_documentation_publish_slate/build/* .
    - name: update action user and commit changes
      run: |
        if [ -n "$(git status --porcelain)" ]; then
          git config --global user.email "<EMAIL>"
          git config --global user.name "Action"
          git commit -m "Add changes" -a
        else
          echo "The documentation has not been updated"
        fi
    - name: push changes
      uses: ad-m/github-push-action@master<commit_msg>clean final 1<commit_after>name: Publish Navitia Documentation

on:
  pull_request:
  push:
    branches:
      - dev
      - release


jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1
    - name: install bundle
      run:  sudo apt install -y bundler
    - name: install httpie dependency
      run: sudo apt install -y httpie
    - name: git checkout on dev
      run: git checkout dev
    - name: generate documentation on dev
      working-directory: documentation/slate
      run: |
        rm -f Gemfile.lock
        bundle install
        bundle exec middleman build
        rm -fr /tmp/job_documentation_publish_slate
        mkdir -p /tmp/job_documentation_publish_slate
        mv build /tmp/job_documentation_publish_slate
    - name: move new documentation on gh-pages
      run: |
        rm -f documentation/slate/Gemfile.lock
        git fetch origin gh-pages:gh-pages
        git checkout gh-pages
        rm -fr *
        mv /tmp/job_documentation_publish_slate/build/* .
    - name: update action user and commit changes
      run: |
        if [ -n "$(git status --porcelain)" ]; then
          git config --global user.email "<EMAIL>"
          git config --global user.name "Action"
          git commit -m "Add changes" -a
        else
          echo "The documentation has not been updated"
        fi
    - name: push changes
      uses: ad-m/github-push-action@master
{'fraction_non_alphanumeric': 0.07676348547717843, 'fraction_numerical': 0.001037344398340249, 'mean_word_length': 1.9917269906928645, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '7314939', 'n_tokens_mistral': 862, 'n_tokens_neox': 823, 'n_words': 277}