Skip to content

Commit 61162dc

Browse files
committed
ci: unify the link and the build action
1 parent a0514c9 commit 61162dc

File tree

1 file changed

+7
-27
lines changed

1 file changed

+7
-27
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ on:
44
pull_request:
55
push:
66
branches:
7-
- master # Only on master now
7+
- master
88

99
jobs:
10-
Lint:
10+
Build:
1111
if: "!contains(github.event.head_commit.message, '[skip ci]')"
1212
runs-on: ubuntu-latest
1313
steps:
@@ -18,30 +18,6 @@ jobs:
1818
- name: Commit lint ✨
1919
uses: wagoid/commitlint-github-action@v5
2020

21-
- uses: actions/setup-node@v3
22-
with:
23-
node-version: 16
24-
25-
- name: Setup PNPM
26-
uses: pnpm/[email protected]
27-
with:
28-
version: latest
29-
30-
- name: Install dependencies
31-
run: pnpm install
32-
33-
# - name: Format ✨
34-
# run: pnpm test.format
35-
36-
- name: Lint ✨
37-
run: pnpm test.lint
38-
39-
build-and-deploy:
40-
needs: [Lint]
41-
if: github.ref == 'refs/heads/master' &&
42-
github.event.repository.fork == false
43-
runs-on: ubuntu-latest
44-
steps:
4521
- name: Checkout 🛎️
4622
uses: actions/checkout@v3
4723

@@ -59,10 +35,14 @@ jobs:
5935
pnpm install
6036
pnpm run build
6137
38+
- name: Lint ✨
39+
run: pnpm test.lint
40+
6241
- name: Deploy 🚀
42+
if: github.ref == 'refs/heads/master' && github.event.repository.fork == false
6343
uses: JamesIves/[email protected]
6444
with:
6545
branch: gh-pages # The branch the action should deploy to.
6646
folder: _site # The folder the action should deploy.
6747
env:
68-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)