Skip to content

Commit 8a295f0

Browse files
docs: refactor CI setup example of GitHub Actions (#4439)
* docs: refactor CI setup example of GitHub Actions * docs: remove redundant double quotation Co-authored-by: JounQin <[email protected]> --------- Co-authored-by: JounQin <[email protected]>
1 parent 370fb85 commit 8a295f0

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

docs/guides/ci-setup.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,29 @@ name: CI
1515

1616
on: [push, pull_request]
1717

18+
permissions:
19+
contents: read
20+
1821
jobs:
1922
commitlint:
20-
runs-on: ubuntu-22.04
23+
runs-on: ubuntu-latest
2124
steps:
22-
- uses: actions/checkout@v3
25+
- uses: actions/checkout@v4
2326
with:
2427
fetch-depth: 0
25-
- name: Install required dependencies
26-
run: |
27-
apt update
28-
apt install -y sudo
29-
sudo apt install -y git curl
30-
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
31-
sudo DEBIAN_FRONTEND=noninteractive apt install -y nodejs
28+
- name: Setup node
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: lts/*
32+
cache: npm
33+
- name: Install commitlint
34+
run: npm install -D @commitlint/cli @commitlint/config-conventional
3235
- name: Print versions
3336
run: |
3437
git --version
3538
node --version
3639
npm --version
3740
npx commitlint --version
38-
- name: Install commitlint
39-
run: |
40-
npm install conventional-changelog-conventionalcommits
41-
npm install commitlint@latest
4241
4342
- name: Validate current commit (last commit) with commitlint
4443
if: github.event_name == 'push'

0 commit comments

Comments
 (0)