diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9aa2cea..b43eb5c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -39,18 +39,18 @@ jobs: with: node-version: "18" - # - name: "Restore node_modules cache" - # id: cache-npm - # uses: actions/cache@v2 - # with: - # path: node_modules - # key: npm-${{ hashFiles('**/package-lock.json') }} - # restore-keys: | - # npm-${{ env.cache-name }}- - # npm- + - name: "Restore node_modules cache" + id: cache-npm + uses: actions/cache@v2 + with: + path: node_modules + key: npm-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + npm-${{ env.cache-name }}- + npm- - name: "Install NPM" - # if: steps.cache-npm.outputs.cache-hit != 'true' + if: steps.cache-npm.outputs.cache-hit != 'true' run: npm ci # Authenticate using JWT flow diff --git a/scripts/test.ps1 b/scripts/test.ps1 index ac30218..ef7305d 100644 --- a/scripts/test.ps1 +++ b/scripts/test.ps1 @@ -52,7 +52,8 @@ if($scratchOrgAllotment -gt 0) { try { Write-Debug "Beginning scratch org creation" # Create Scratch Org - sf org create scratch --definition-file config/project-scratch-def.json --alias $userAlias --set-default --duration-days + npx sf org create scratch --definition-file config/project-scratch-def.json --alias $userAlias --set-default --duration-days + npx sf config set target-org $userAlias } catch { # Do nothing, we'll just try to deploy to the Dev Hub instead }