Skip to content

Commit 4c05769

Browse files
committed
Update blog-deployment.yml
1 parent 80be1a3 commit 4c05769

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

.github/workflows/blog-deployment.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,36 @@ on:
66
- main
77
paths:
88
- 'opensaas-sh/blog/**'
9+
pull_request:
10+
branches:
11+
- main
12+
paths:
13+
- 'opensaas-sh/blog/**'
914

1015
jobs:
11-
deploy:
16+
build:
1217
runs-on: ubuntu-latest
18+
if: github.event_name == 'pull_request'
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v3
1322

23+
- name: Setup Node.js
24+
uses: actions/setup-node@v3
25+
with:
26+
node-version: '18'
27+
28+
- name: Install dependencies
29+
working-directory: ./opensaas-sh/blog
30+
run: npm install
31+
32+
- name: Build site
33+
working-directory: ./opensaas-sh/blog
34+
run: npm run build
35+
36+
deploy:
37+
runs-on: ubuntu-latest
38+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
1439
steps:
1540
- name: Checkout code
1641
uses: actions/checkout@v3

0 commit comments

Comments
 (0)