Skip to content

Commit

Permalink
fix: update nodejs versions in CI pipeline (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
zoey-kaiser authored Aug 19, 2024
1 parent f016edf commit eac5610
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 20 deletions.
39 changes: 25 additions & 14 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,50 @@ on:
pull_request:
branches: [ main ]

env:
NODE_VER: 22.5

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.6.1
uses: actions/setup-node@v4

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
node-version: 20.6.1
run_install: false

- name: Setup
run: npm i -g @antfu/ni
- name: Use Node.js ${{ env.NODE_VER }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VER }}
cache: 'pnpm'

- name: Install
run: nci
run: pnpm i

- name: Lint
run: nr lint
run: pnpm lint

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.6.1
uses: actions/setup-node@v4

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
node-version: 20.6.1
run_install: false

- name: Setup
run: npm i -g @antfu/ni
- name: Use Node.js ${{ env.NODE_VER }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VER }}
cache: 'pnpm'

- name: Install
run: nci
run: pnpm i

- name: Build
run: nr build
run: pnpm build
21 changes: 15 additions & 6 deletions .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

env:
NODE_VER: 22.5

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
Expand All @@ -28,21 +31,27 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0 # Required to calculate lastUpdated
- name: Install pnpm
uses: pnpm/action-setup@v3

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 8
- name: Setup Node
run_install: false

- name: Use Node.js ${{ env.NODE_VER }}
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
node-version: ${{ env.NODE_VER }}
cache: 'pnpm'

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Install dependencies
run: pnpm i

- name: Build with VitePress
run: pnpm build

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down

0 comments on commit eac5610

Please sign in to comment.