Skip to content

Commit 253aaec

Browse files
committed
refactor: Update workflow to checkout code and setup Node.js
This commit updates the workflow in the `.github/workflows/Web.yaml` file. It replaces the separate steps for checking out the code and setting up Node.js with a single step that performs both actions. This improves the efficiency and readability of the workflow. The changes include: - Replacing the `actions/checkout@v4` step with a new step named `Checkout`. - Adding a new step named `Setup Node.js` to set up the latest version of Node.js and cache it using `pnpm`. These changes ensure that the code is properly checked out and the latest version of Node.js is set up for the subsequent build and deploy steps.
1 parent ed420a9 commit 253aaec

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/Web.yaml

+8-6
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,21 @@ jobs:
1010
runs-on: ubuntu-latest
1111
name: Build and Deploy
1212
steps:
13-
- uses: actions/checkout@v4
14-
15-
- uses: actions/setup-node@v4
16-
with:
17-
node-version: "latest"
18-
cache: "pnpm"
13+
- name: Checkout
14+
uses: actions/checkout@v4
1915

2016
- name: Install pnpm
2117
uses: pnpm/action-setup@v4
2218
with:
2319
version: "latest"
2420
run_install: false
2521

22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: "latest"
26+
cache: "pnpm"
27+
2628
- name: UseFile
2729
run: sed -i 's/SD_BACKEND_FILE=false/SD_BACKEND_FILE=true/' .env &&
2830
curl -o public/mock.json https://status.cloudmon.eco.tsi-dev.otc-service.com/api/v1/component_status

0 commit comments

Comments
 (0)