<commit_before>---
name: GitHub-Pages

on:
    push:
        branches:
            - master
        paths:
            - docs/**
    pull_request:
    workflow_dispatch:

jobs:
    update_diagrams:
        name: Generate UML class diagrams

        runs-on: ${{ matrix.os }}

        strategy:
            fail-fast: false
            matrix:
                os:
                    - ubuntu-latest
                php:
                    - 7.4

        steps:
            -   # Git Checkout
                name: Checkout Code
                uses: actions/checkout@v2
                with:
                    persist-credentials: false

            -   # Setup Libraries
                name: Setup Libraries
                run: |
                    sudo apt-get update
                    sudo apt-fast install graphviz -y

            -   # Setup PHP runtime
                name: Setup PHP runtime
                uses: shivammathur/setup-php@v2
                with:
                    php-version: ${{ matrix.php }}

            -   # Install Composer dependencies
                name: Install Composer dependencies
                uses: ramsey/composer-install@v2
                with:
                    dependency-versions: "highest"
                    composer-options: "--prefer-dist --no-scripts"

            -   # Update diagrams used in documentation
                name: Update Diagrams
                run: |
                    php resources/graph-uml/build.php application-command docs/assets/images
                    php resources/graph-uml/build.php application-event docs/assets/images
                    php resources/graph-uml/build.php application-query docs/assets/images
                    php resources/graph-uml/build.php application-service docs/assets/images
                    php resources/graph-uml/build.php domain-factory docs/assets/images
                    php resources/graph-uml/build.php domain-repository docs/assets/images
                    php resources/graph-uml/build.php domain-valueobject docs/assets/images
                    php resources/graph-uml/build.php infrastructure-bus docs/assets/images
                    php resources/graph-uml/build.php infrastructure-framework docs/assets/images
                    php resources/graph-uml/build.php infrastructure-persistence docs/assets/images
                    php resources/graph-uml/build.php presentation-console docs/assets/images

            -   # Commit UML class diagrams assets
                run: |
                    git config user.name github-actions
                    git config user.email github-<EMAIL>
                    git add docs/assets/images
                    git commit -m "UML class diagrams generated"
                    git push

    deploy:
        needs: update_diagrams
        uses: llaville/.github/.github/workflows/gh-pages.yml@master
        with:
            destination-dir: 4.x<commit_msg>create destination folder of assets first<commit_after>---
name: GitHub-Pages

on:
    push:
        branches:
            - master
        paths:
            - docs/**
    pull_request:
    workflow_dispatch:

jobs:
    update_diagrams:
        name: Generate UML class diagrams

        runs-on: ${{ matrix.os }}

        strategy:
            fail-fast: false
            matrix:
                os:
                    - ubuntu-latest
                php:
                    - 7.4

        steps:
            -   # Git Checkout
                name: Checkout Code
                uses: actions/checkout@v2
                with:
                    persist-credentials: false

            -   # Setup Libraries
                name: Setup Libraries
                run: |
                    sudo apt-get update
                    sudo apt-fast install graphviz -y

            -   # Setup PHP runtime
                name: Setup PHP runtime
                uses: shivammathur/setup-php@v2
                with:
                    php-version: ${{ matrix.php }}

            -   # Install Composer dependencies
                name: Install Composer dependencies
                uses: ramsey/composer-install@v2
                with:
                    dependency-versions: "highest"
                    composer-options: "--prefer-dist --no-scripts"

            -   # Update diagrams used in documentation
                name: Update Diagrams
                run: |
                    mkdir -p docs/asset/images
                    php resources/graph-uml/build.php application-command docs/assets/images
                    php resources/graph-uml/build.php application-event docs/assets/images
                    php resources/graph-uml/build.php application-query docs/assets/images
                    php resources/graph-uml/build.php application-service docs/assets/images
                    php resources/graph-uml/build.php domain-factory docs/assets/images
                    php resources/graph-uml/build.php domain-repository docs/assets/images
                    php resources/graph-uml/build.php domain-valueobject docs/assets/images
                    php resources/graph-uml/build.php infrastructure-bus docs/assets/images
                    php resources/graph-uml/build.php infrastructure-framework docs/assets/images
                    php resources/graph-uml/build.php infrastructure-persistence docs/assets/images
                    php resources/graph-uml/build.php presentation-console docs/assets/images

            -   # Commit UML class diagrams assets
                run: |
                    git config user.name github-actions
                    git config user.email <EMAIL>
                    git add docs/assets/images
                    git commit -m "UML class diagrams generated"
                    git push

    deploy:
        needs: update_diagrams
        uses: llaville/.github/.github/workflows/gh-pages.yml@master
        with:
            destination-dir: 4.x
{'fraction_non_alphanumeric': 0.0701637153357835, 'fraction_numerical': 0.0020046775810223854, 'mean_word_length': 1.2669443392654298, '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': '1439090', 'n_tokens_mistral': 1558, 'n_tokens_neox': 1373, 'n_words': 341}