Skip to content

Commit 44e6c13

Browse files
committed
ci: add GitHub Actions workflows for deployment and linting
1 parent a4283d5 commit 44e6c13

File tree

2 files changed

+51
-15
lines changed

2 files changed

+51
-15
lines changed

.github/workflows/ci.yml renamed to .github/workflows/deploy.yml

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: Deploy
22

33
on:
44
push:
@@ -11,30 +11,25 @@ jobs:
1111

1212
strategy:
1313
matrix:
14-
os: [ubuntu-latest] # macos-latest, windows-latest
15-
node: [20]
14+
os: [ubuntu-latest, macos-latest, windows-latest]
15+
node-version: [20.x]
1616

1717
steps:
1818
- uses: actions/checkout@v4
1919

20-
- name: Set node version to ${{ matrix.node-version }}
20+
- uses: pnpm/[email protected]
21+
22+
- name: Use Node.js ${{ matrix.node-version }}
2123
uses: actions/setup-node@v4
2224
with:
2325
node-version: ${{ matrix.node-version }}
26+
cache: 'pnpm'
2427

25-
- run: corepack enable
26-
27-
- name: Setup
28-
run: npm i -g @antfu/ni
29-
30-
- name: Install
31-
run: nci
28+
- name: Install dependencies
29+
run: pnpm install
3230

3331
- name: Build
34-
run: nr build
35-
36-
- name: Lint
37-
run: nr lint
32+
run: pnpm build
3833

3934
- name: SSH Deploy
4035
uses: easingthemes/[email protected]

.github/workflows/lint.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Lint
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
build:
13+
name: Lint
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
matrix:
18+
node-version: [20.x]
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
lfs: true
25+
26+
- name: Checkout LFS objects
27+
run: git lfs checkout
28+
29+
- uses: pnpm/[email protected]
30+
31+
- name: Use Node.js ${{ matrix.node-version }}
32+
uses: actions/setup-node@v4
33+
with:
34+
node-version: ${{ matrix.node-version }}
35+
cache: 'pnpm'
36+
37+
- name: Install dependencies
38+
run: pnpm install
39+
40+
- name: Run Lint
41+
run: pnpm lint

0 commit comments

Comments
 (0)