<commit_before>name: Build assets

on:
  push:
    paths:
      - '.github/workflows/assets.yml'
      - 'public/**'
      - 'ui/**'
      - 'package.json'
      - 'yarn.lock'
  pull_request:
    paths:
      - '.github/workflows/assets.yml'
      - 'public/**'
      - 'ui/**'
      - 'package.json'
      - 'yarn.lock'

jobs:
  assets:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          submodules: recursive
      - run: git submodule absorbgitdirs
      - uses: actions/checkout@v2
        with:
          repository: lichess-org/ab
          ssh-key: ${{ secrets.id_rsa_ab }}
          ref: master
          path: ab
        continue-on-error: true
        id: ab
      - run: yarn link --cwd "$GITHUB_WORKSPACE/ab" && yarn link ab --cwd ui/round
        if: steps.ab.outcome == 'success'
      - run: echo "::set-output name=dir::$(yarn cache dir)"
        id: yarn-cache
      - uses: actions/cache@v2
        with:
          path: ${{ steps.yarn-cache.outputs.dir }}
          key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
          restore-keys: ${{ runner.os }}-yarn-
      - run: ./ui/build prod
      - run: mkdir assets && mv public assets/ && cp LICENSE COPYING.md README.md assets/ && git log -n 1 --pretty=oneline > assets/commit.txt<commit_msg>use yarn package caching from setup-node@v2.2.0<commit_after>name: Build assets

on:
  push:
    paths:
      - '.github/workflows/assets.yml'
      - 'public/**'
      - 'ui/**'
      - 'package.json'
      - 'yarn.lock'
  pull_request:
    paths:
      - '.github/workflows/assets.yml'
      - 'public/**'
      - 'ui/**'
      - 'package.json'
      - 'yarn.lock'

jobs:
  assets:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          submodules: recursive
      - run: git submodule absorbgitdirs
      - uses: actions/setup-node@v2
        with:
          node-version: '14'
          cache: 'yarn'
      - uses: actions/checkout@v2
        with:
          repository: lichess-org/ab
          ssh-key: ${{ secrets.id_rsa_ab }}
          ref: master
          path: ab
        continue-on-error: true
        id: ab
      - run: yarn link --cwd "$GITHUB_WORKSPACE/ab" && yarn link ab --cwd ui/round
        if: steps.ab.outcome == 'success'
      - run: ./ui/build prod
      - run: mkdir assets && mv public assets/ && cp LICENSE COPYING.md README.md assets/ && git log -n 1 --pretty=oneline > assets/commit.txt
{'fraction_non_alphanumeric': 0.14620355411954766, 'fraction_numerical': 0.005250403877221325, 'mean_word_length': 1.730981256890849, 'pattern_counts': {'":': 1, '<': 3, '<?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': '3192689', 'n_tokens_mistral': 868, 'n_tokens_neox': 835, 'n_words': 191}