mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-12-24 17:52:50 +00:00
7320fe2ac1
This is an import of 166ca8da12
with some changes to make it fit into the mono repo.
- TypedEventEmitter has been replaced with EventEmitter2 because EventEmitter2 is faster and TypedEventEmitter had some troubles with the new way of compiling.
- tsc-esm has been replaced with microbundle. The problems that lib0 doesn't export its types correctly has been solved using yarn patch.
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
# SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
|
#
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
name: Setup Node
|
|
description: "Setups node and configures the cache"
|
|
|
|
inputs:
|
|
NODE_VERSION:
|
|
required: true
|
|
type: string
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Get yarn cache directory path
|
|
id: yarn-cache-dir-path
|
|
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
|
shell: bash
|
|
|
|
- name: Cache yarn cache
|
|
uses: actions/cache@v3
|
|
id: yarn-cache
|
|
with:
|
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
key: ${{ runner.os }}-${{ inputs.NODE_VERSION }}-yarn-${{ hashFiles('frontend/yarn.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-yarn-${{ inputs.NODE_VERSION }}
|
|
|
|
- name: Set up NodeJS
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{ inputs.NODE_VERSION }}
|
|
|
|
- name: Install dependencies
|
|
run: yarn install --immutable
|
|
working-directory: .
|
|
shell: bash
|
|
|
|
- name: Build commons lib
|
|
run: yarn build
|
|
working-directory: commons
|
|
shell: bash
|