Skip to content

Commit

Permalink
ci: update workflow jobs versions + set node ver to >=20.11.1 (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzocorallo authored Jul 4, 2024
1 parent fb5da34 commit 6dfd827
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@ jobs:

steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
check-latest: true
node-version-file: "package.json"

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
Expand All @@ -30,7 +29,7 @@ jobs:
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,22 @@ jobs:
steps:
- name: Checkout branch
if: ${{ !startsWith(github.event_name, 'pull_request') }}
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Checkout PR head
if: ${{ startsWith(github.event_name, 'pull_request') }}
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge

# Assuming you're using Node.js
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
if: ${{ github.event.action != 'closed' }} # Skipping these steps if the PR has been closed
with:
node-version: 'lts/*'
check-latest: true
node-version-file: "package.json"

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
Expand All @@ -52,7 +51,7 @@ jobs:
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"preview": "vite preview"
},
"engines": {
"node": ">=18.16.0",
"node": ">=20.11.1",
"pnpm": "9.x.x"
},
"dependencies": {
Expand Down

0 comments on commit 6dfd827

Please sign in to comment.