add # and ## back to forums #16282
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build assets | |
| env: | |
| ACTIONS_STEP_DEBUG: true | |
| on: | |
| push: | |
| paths: | |
| - '.github/workflows/assets.yml' | |
| - 'public/**' | |
| - 'ui/**' | |
| - 'package.json' | |
| - 'pnpm-lock.yaml' | |
| - '.node-version' | |
| pull_request: | |
| paths: | |
| - '.github/workflows/assets.yml' | |
| - 'public/**' | |
| - 'ui/**' | |
| - 'package.json' | |
| - 'pnpm-lock.yaml' | |
| - '.node-version' | |
| jobs: | |
| assets: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup node and restore pnpm cache | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version-file: .node-version | |
| cache: 'pnpm' | |
| - name: Install pnpm dependencies | |
| run: pnpm install | |
| - name: Checkout ab (optional) | |
| uses: actions/checkout@v5 | |
| with: | |
| repository: lichess-org/ab | |
| ssh-key: ${{ secrets.id_rsa_ab }} | |
| ref: master | |
| path: ab | |
| env: | |
| HAS_AB: ${{ secrets.id_rsa_ab != '' }} | |
| if: env.HAS_AB == 'true' | |
| id: ab | |
| - name: Link ab (optional) | |
| run: pnpm link "$GITHUB_WORKSPACE/ab" | |
| if: steps.ab.outcome == 'success' | |
| - name: Print tool versions | |
| run: node -v && pnpm -v && cd ui/.build && pnpm tsc -v | |
| - name: Build | |
| run: ./ui/build --no-install -p | |
| - name: Tests | |
| run: pnpm test | |
| - name: Prepare asset dir | |
| run: | | |
| mkdir -p assets/public | |
| mv public/compiled public/css public/hashed public/npm assets/public/ | |
| cp -p LICENSE COPYING.md README.md assets/ | |
| git log -n 1 --pretty=oneline > assets/commit.txt | |
| - name: Tar assets | |
| run: cd assets && tar --zstd -cvpf ../assets.tar.zst . && cd - | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: lila-assets | |
| path: assets.tar.zst | |
| compression-level: 0 # already compressed |