From a6c29fec4deab8e2307c03a01dbf747df76de9c1 Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Wed, 17 Apr 2024 15:20:13 -0700 Subject: [PATCH 1/7] fix: use local dev dep of CLI --- action.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 1fbac9a..4b60809 100644 --- a/action.yml +++ b/action.yml @@ -76,7 +76,7 @@ runs: - name: Install para CLI shell: bash run: | - npm install -g @useparagon/cli + npm install --include=dev - name: Authenticate into CLI env: @@ -110,13 +110,13 @@ runs: - name: Build Paragraph project shell: bash run: | - para install - para build + npx para install + npx para build - name: Push to Paragon shell: bash if: github.event_name == 'push' && steps.validate.outputs.valid == 'true' - run: para push + run: npx para push # Post steps - name: Update success status in Paragon From a6f49d6dc22481238d6e54827e835a0086851570 Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Wed, 17 Apr 2024 15:29:42 -0700 Subject: [PATCH 2/7] fix: switch between global install and dev deps --- action.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/action.yml b/action.yml index 4b60809..8297452 100644 --- a/action.yml +++ b/action.yml @@ -73,11 +73,25 @@ runs: with: node-version: v18.17.1 + - name: Check for project-level para CLI + id: checkProjectCLI + shell: bash + run: | + deps=$(npm list | grep @useparagon/cli | wc -l) + echo "deps=$deps" >> $GITHUB_OUTPUT + - name: Install para CLI + if: steps.checkProjectCLI.outputs.deps != '0' shell: bash run: | npm install --include=dev + - name: Install para CLI globally + if: steps.checkProjectCLI.outputs.deps == '0' + shell: bash + run: | + npm install -g @useparagon/cli + - name: Authenticate into CLI env: PARAGON_CLI_KEY: ${{ inputs.paragonKey }} From b62d66b21d84f767c716c5cbee1e646d3fbf0db8 Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Fri, 14 Jun 2024 00:36:02 +0900 Subject: [PATCH 3/7] feat: add support for optional path input --- action.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/action.yml b/action.yml index 8297452..a1afae7 100644 --- a/action.yml +++ b/action.yml @@ -15,6 +15,11 @@ inputs: type: string required: false default: "https://dashboard.useparagon.com" + path: + type: string + description: 'Specify base path to Paragraph project, relative to the working directory.' + required: false + default: "./" runs: using: 'composite' @@ -75,6 +80,7 @@ runs: - name: Check for project-level para CLI id: checkProjectCLI + working-directory: ${{ inputs.path }} shell: bash run: | deps=$(npm list | grep @useparagon/cli | wc -l) @@ -82,6 +88,7 @@ runs: - name: Install para CLI if: steps.checkProjectCLI.outputs.deps != '0' + working-directory: ${{ inputs.path }} shell: bash run: | npm install --include=dev @@ -123,12 +130,14 @@ runs: - name: Build Paragraph project shell: bash + working-directory: ${{ inputs.path }} run: | npx para install npx para build - name: Push to Paragon shell: bash + working-directory: ${{ inputs.path }} if: github.event_name == 'push' && steps.validate.outputs.valid == 'true' run: npx para push From ce0dbba611105ed62e8446e7b401e3e2ce119e43 Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Mon, 17 Jun 2024 08:22:55 -0700 Subject: [PATCH 4/7] fix: use cat/jq instead of npm list for preinstall check --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index a1afae7..5f76190 100644 --- a/action.yml +++ b/action.yml @@ -83,7 +83,7 @@ runs: working-directory: ${{ inputs.path }} shell: bash run: | - deps=$(npm list | grep @useparagon/cli | wc -l) + deps=$(cat package.json | jq .dependencies | grep @useparagon/cli | wc -l) echo "deps=$deps" >> $GITHUB_OUTPUT - name: Install para CLI From f72d541c58d4b9c9a900a7ec69fc397cb5ef2a45 Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Mon, 17 Jun 2024 10:57:35 -0700 Subject: [PATCH 5/7] fix: temporarily revert local CLI changes --- action.yml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/action.yml b/action.yml index 5f76190..b539b6f 100644 --- a/action.yml +++ b/action.yml @@ -78,23 +78,7 @@ runs: with: node-version: v18.17.1 - - name: Check for project-level para CLI - id: checkProjectCLI - working-directory: ${{ inputs.path }} - shell: bash - run: | - deps=$(cat package.json | jq .dependencies | grep @useparagon/cli | wc -l) - echo "deps=$deps" >> $GITHUB_OUTPUT - - - name: Install para CLI - if: steps.checkProjectCLI.outputs.deps != '0' - working-directory: ${{ inputs.path }} - shell: bash - run: | - npm install --include=dev - - name: Install para CLI globally - if: steps.checkProjectCLI.outputs.deps == '0' shell: bash run: | npm install -g @useparagon/cli From 81cf235ef65ac90c9437bcfeaf2a873cca7c3eb8 Mon Sep 17 00:00:00 2001 From: Loren <112435357+loren-paragon@users.noreply.github.com> Date: Thu, 20 Feb 2025 11:25:31 -0800 Subject: [PATCH 6/7] Update action.yml copied from `paragraph-pull` --- action.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index b539b6f..4ea789b 100644 --- a/action.yml +++ b/action.yml @@ -15,11 +15,10 @@ inputs: type: string required: false default: "https://dashboard.useparagon.com" - path: + subfolder: type: string - description: 'Specify base path to Paragraph project, relative to the working directory.' required: false - default: "./" + default: '.' runs: using: 'composite' From c8b910f598a237e85dbb9d275748c65784011589 Mon Sep 17 00:00:00 2001 From: Loren <112435357+loren-paragon@users.noreply.github.com> Date: Thu, 20 Feb 2025 11:32:19 -0800 Subject: [PATCH 7/7] Apply suggestions from code review updating to match subfolder --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 4ea789b..30b9388 100644 --- a/action.yml +++ b/action.yml @@ -113,14 +113,14 @@ runs: - name: Build Paragraph project shell: bash - working-directory: ${{ inputs.path }} + working-directory: ${{ inputs.subfolder }} run: | npx para install npx para build - name: Push to Paragon shell: bash - working-directory: ${{ inputs.path }} + working-directory: ${{ inputs.subfolder }} if: github.event_name == 'push' && steps.validate.outputs.valid == 'true' run: npx para push