From bed372e6707741c557dc99d6b9e8b4c6d369c043 Mon Sep 17 00:00:00 2001 From: Zakary Timson Date: Fri, 24 Nov 2023 16:55:39 +0000 Subject: [PATCH] Add .github/workflows/npm.yaml --- .github/workflows/npm.yaml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/npm.yaml diff --git a/.github/workflows/npm.yaml b/.github/workflows/npm.yaml new file mode 100644 index 0000000..e534f00 --- /dev/null +++ b/.github/workflows/npm.yaml @@ -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}}