Add .github/workflows/npm.yaml
This commit is contained in:
parent
4dd4f32188
commit
bed372e670
33
.github/workflows/npm.yaml
vendored
Normal file
33
.github/workflows/npm.yaml
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
name: Install Dependencies & Build NPM Project
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
repository:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
description: Git repository URL
|
||||||
|
path:
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
description: Path to NPM project root
|
||||||
|
default: .
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker:
|
||||||
|
name: Install Dependencies & Build NPM Project
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: node
|
||||||
|
steps:
|
||||||
|
- name: Clone Repository
|
||||||
|
uses: ztimson/actions/clone@develop
|
||||||
|
with:
|
||||||
|
url: ${{inputs.repository}}
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: npm i
|
||||||
|
working-directory: ${{inputs.path}}
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: npm run build:prod || npm run build
|
||||||
|
working-directory: ${{inputs.path}}
|
Loading…
Reference in New Issue
Block a user