Skip to content

Commit fa2a487

Browse files
authored
Workflow: 增加对 pr 的页面测试
1 parent 3b69640 commit fa2a487

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ on:
33
push:
44
branches:
55
- main
6+
pull_request:
7+
branches:
8+
- main
69
permissions:
710
contents: write
811
jobs:
@@ -24,7 +27,11 @@ jobs:
2427
path: .cache
2528
restore-keys: |
2629
mkdocs-material-
27-
- run: pip install jieba
28-
- run: pip install mkdocs-material
29-
- run: pip install mkdocs-static-i18n
30-
- run: mkdocs gh-deploy --force
30+
- name: Install dependencies
31+
run: pip install mkdocs-material mkdocs-static-i18n jieba
32+
- name: Build for Pull Request check
33+
if: github.event_name == 'pull_request'
34+
run: mkdocs build --verbose
35+
- name: Deploy to gh-pages
36+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
37+
run: mkdocs gh-deploy --force

0 commit comments

Comments
 (0)