-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (48 loc) · 1.41 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Build
on:
pull_request: {}
workflow_dispatch: {}
jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Install Node.js
run: |
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs
echo /opt/hostedtoolcache/node/22.10.0/x64/bin >> $GITHUB_PATH
- name: Check node
run: |
echo $PATH
which node
which npm
node -v
npm -v
- name: Restore NPM node_modules
uses: actions/cache/[email protected]
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node_modules-
- name: Install deps
run: |
corepack enable
corepack prepare pnpm@latest --activate
pnpm install
- name: Cache NPM dependencies
uses: actions/[email protected]
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node_modules-
- name: Disable Next.js Telemetry
run: echo "NEXT_TELEMETRY_DISABLED=1" >> "$GITHUB_ENV"
- name: Run build
run: pnpm run build