Skip to content

Commit

Permalink
build: bump GitHub Actions versions
Browse files Browse the repository at this point in the history
Remove the dependency on actions/cache by using the built-in
cache configuration of actions/setup-node
  • Loading branch information
matijs committed Mar 25, 2024
1 parent e5b9de0 commit 9fb2d58
Showing 1 changed file with 39 additions and 100 deletions.
139 changes: 39 additions & 100 deletions .github/workflows/continuous-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,18 @@ jobs:

steps:
- name: Checkout branch
uses: actions/checkout@v3
uses: actions/checkout@v4.1.1

- name: Set up Node.js version
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"

- uses: pnpm/[email protected]
name: Install pnpm
id: pnpm-install
- name: Install pnpm package manager
uses: pnpm/[email protected]
with:
version: 8
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v4
name: Setup pnpm cache
- name: Set up Node.js version
uses: actions/[email protected]
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
node-version-file: .nvmrc
cache: pnpm

- name: Install dependencies
run: |
Expand All @@ -49,31 +36,18 @@ jobs:

steps:
- name: Checkout branch
uses: actions/checkout@v3
uses: actions/checkout@v4.1.1

- name: Set up Node.js version
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"

- uses: pnpm/[email protected]
name: Install pnpm
id: pnpm-install
- name: Install pnpm package manager
uses: pnpm/[email protected]
with:
version: 8
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v4
name: Setup pnpm cache
- name: Set up Node.js version
uses: actions/[email protected]
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
node-version-file: .nvmrc
cache: pnpm

- name: Install dependencies
run: |
Expand All @@ -89,31 +63,18 @@ jobs:

steps:
- name: Checkout branch
uses: actions/checkout@v3

- name: Set up Node.js version
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
uses: actions/[email protected]

- uses: pnpm/[email protected]
name: Install pnpm
id: pnpm-install
- name: Install pnpm package manager
uses: pnpm/[email protected]
with:
version: 8
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v4
name: Setup pnpm cache
- name: Set up Node.js version
uses: actions/[email protected]
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
node-version-file: .nvmrc
cache: pnpm

- name: Install dependencies
run: |
Expand All @@ -126,7 +87,7 @@ jobs:
pnpm run --if-present build
- name: "Retain build artifact: storybook"
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4.3.1
with:
name: storybook
path: packages/storybook/dist/
Expand All @@ -138,31 +99,18 @@ jobs:

steps:
- name: Checkout branch
uses: actions/checkout@v3
uses: actions/checkout@v4.1.1

- name: Set up Node.js version
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"

- uses: pnpm/[email protected]
name: Install pnpm
id: pnpm-install
- name: Install pnpm package manager
uses: pnpm/[email protected]
with:
version: 8
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v4
name: Setup pnpm cache
- name: Set up Node.js version
uses: actions/[email protected]
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
node-version-file: .nvmrc
cache: pnpm

- name: Install dependencies
run: |
Expand All @@ -179,10 +127,10 @@ jobs:

steps:
- name: Checkout release branch
uses: actions/checkout@v3
uses: actions/checkout@v4.1.1

- name: "Restore build artifact: Storybook"
uses: actions/download-artifact@v4
uses: actions/download-artifact@v4.1.4
with:
name: storybook
path: packages/storybook/dist/
Expand All @@ -201,35 +149,26 @@ jobs:

steps:
- name: Checkout release branch
uses: actions/checkout@v3
uses: actions/checkout@v4.1.1
with:
token: ${{ secrets.GH_TOKEN }}

- name: Set up Node.js version
uses: actions/setup-node@v3
- name: Install pnpm
uses: pnpm/action-setup@v3.0.0
with:
node-version-file: ".nvmrc"
version: 8

- uses: pnpm/[email protected]
name: Install pnpm
id: pnpm-install
- name: Set up Node.js version
uses: actions/[email protected]
with:
version: 8
run_install: false
node-version-file: .nvmrc
cache: pnpm

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: "Continuous Deployment: install"
run: |
pnpm install --frozen-lockfile
Expand Down

0 comments on commit 9fb2d58

Please sign in to comment.