From 5de4ae40c8f35b40ab553590abcef6391d92078c Mon Sep 17 00:00:00 2001 From: Matej Vobornik Date: Fri, 18 Oct 2024 09:44:05 +0200 Subject: [PATCH] fix: Install dependencies in deploy workflow (#265) --- .github/workflows/deploy.yml | 16 ++++++++++++++++ reusable-workflows/deploy.yml | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ed5231d..10c5816 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -67,12 +67,28 @@ jobs: deployment_url: ${{ steps.deployment-url.outputs.url }} steps: - uses: actions/checkout@v4.1.4 + + - uses: pnpm/action-setup@v4.0.0 + - uses: actions/setup-node@v4.0.2 with: node-version: "20" registry-url: "https://npm.pkg.github.com" scope: ${{ inputs.registry_scope }} + - name: Cache node_modules/.pnpm + uses: actions/cache@v4.0.2 + with: + path: node_modules/.pnpm + key: pnpm-node-modules-${{ hashFiles('pnpm-lock.yaml') }} + restore-keys: | + pnpm-node-modules- + + - name: Install Dependencies + run: pnpm install --frozen-lockfile --ignore-scripts + env: + NODE_AUTH_TOKEN: ${{ secrets.GH_REGISTRY_NPM_TOKEN }} + - name: Setup AWS Credentials for Origin Bucket Access uses: aws-actions/configure-aws-credentials@v4.0.2 with: diff --git a/reusable-workflows/deploy.yml b/reusable-workflows/deploy.yml index ed5231d..10c5816 100644 --- a/reusable-workflows/deploy.yml +++ b/reusable-workflows/deploy.yml @@ -67,12 +67,28 @@ jobs: deployment_url: ${{ steps.deployment-url.outputs.url }} steps: - uses: actions/checkout@v4.1.4 + + - uses: pnpm/action-setup@v4.0.0 + - uses: actions/setup-node@v4.0.2 with: node-version: "20" registry-url: "https://npm.pkg.github.com" scope: ${{ inputs.registry_scope }} + - name: Cache node_modules/.pnpm + uses: actions/cache@v4.0.2 + with: + path: node_modules/.pnpm + key: pnpm-node-modules-${{ hashFiles('pnpm-lock.yaml') }} + restore-keys: | + pnpm-node-modules- + + - name: Install Dependencies + run: pnpm install --frozen-lockfile --ignore-scripts + env: + NODE_AUTH_TOKEN: ${{ secrets.GH_REGISTRY_NPM_TOKEN }} + - name: Setup AWS Credentials for Origin Bucket Access uses: aws-actions/configure-aws-credentials@v4.0.2 with: