name: Setup App description: Sets up Node.js, installs dependencies, and optionally builds the app. inputs: install-command: description: Command used to install dependencies. required: false default: pnpm install --frozen-lockfile build: description: Whether to build the app after installing dependencies. required: false default: 'false' build-command: description: Command used when build is enabled. required: false default: pnpm run build runs: using: composite steps: - name: Setup pnpm uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0 - name: Setup node uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 with: node-version-file: '.node-version' cache: 'pnpm' - name: Install dependencies shell: bash working-directory: ${{ github.workspace }} run: ${INPUTS_INSTALL_COMMAND} env: INPUTS_INSTALL_COMMAND: ${{ inputs.install-command }} - name: Build app if: ${{ inputs.build == 'true' }} shell: bash working-directory: ${{ github.workspace }} run: ${INPUTS_BUILD_COMMAND} env: INPUTS_BUILD_COMMAND: ${{ inputs.build-command }}