Skip to content

Commit b1a4f27

Browse files
committed
docs: Add pull_request event
1 parent e831faa commit b1a4f27

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

README.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ on:
134134
push:
135135
branches:
136136
- main # Set a branch name to trigger deployment
137+
pull_request:
137138
138139
jobs:
139140
deploy:
@@ -147,13 +148,14 @@ jobs:
147148
- name: Setup Hugo
148149
uses: peaceiris/actions-hugo@v2
149150
with:
150-
hugo-version: '0.79.1'
151+
hugo-version: '0.83.1'
151152
152153
- name: Build
153154
run: hugo --minify
154155
155156
- name: Deploy
156157
uses: peaceiris/actions-gh-pages@v3
158+
if: github.ref == 'refs/heads/main'
157159
with:
158160
github_token: ${{ secrets.GITHUB_TOKEN }}
159161
publish_dir: ./public
@@ -631,6 +633,7 @@ on:
631633
push:
632634
branches:
633635
- main
636+
pull_request:
634637
635638
jobs:
636639
deploy:
@@ -656,6 +659,7 @@ jobs:
656659
657660
- name: Deploy
658661
uses: peaceiris/actions-gh-pages@v3
662+
if: github.ref == 'refs/heads/main'
659663
with:
660664
github_token: ${{ secrets.GITHUB_TOKEN }}
661665
publish_dir: ./public
@@ -675,6 +679,7 @@ on:
675679
push:
676680
branches:
677681
- main
682+
pull_request:
678683
679684
jobs:
680685
deploy:
@@ -702,6 +707,7 @@ jobs:
702707
703708
- name: Deploy
704709
uses: peaceiris/actions-gh-pages@v3
710+
if: github.ref == 'refs/heads/main'
705711
with:
706712
github_token: ${{ secrets.GITHUB_TOKEN }}
707713
publish_dir: ./public
@@ -723,6 +729,7 @@ on:
723729
push:
724730
branches:
725731
- main
732+
pull_request:
726733
727734
jobs:
728735
deploy:
@@ -753,6 +760,7 @@ jobs:
753760
754761
- name: Deploy
755762
uses: peaceiris/actions-gh-pages@v3
763+
if: github.ref == 'refs/heads/main'
756764
with:
757765
github_token: ${{ secrets.GITHUB_TOKEN }}
758766
publish_dir: ./out
@@ -774,6 +782,7 @@ on:
774782
push:
775783
branches:
776784
- main
785+
pull_request:
777786
778787
jobs:
779788
deploy:
@@ -800,6 +809,7 @@ jobs:
800809
801810
- name: deploy
802811
uses: peaceiris/actions-gh-pages@v3
812+
if: github.ref == 'refs/heads/main'
803813
with:
804814
github_token: ${{ secrets.GITHUB_TOKEN }}
805815
publish_dir: ./dist
@@ -823,6 +833,7 @@ on:
823833
paths:
824834
- '.github/workflows/deploy.yml'
825835
- 'website/**'
836+
pull_request:
826837
827838
jobs:
828839
deploy:
@@ -855,6 +866,7 @@ jobs:
855866
856867
- name: Deploy
857868
uses: peaceiris/actions-gh-pages@v3
869+
if: github.ref == 'refs/heads/main'
858870
with:
859871
github_token: ${{ secrets.GITHUB_TOKEN }}
860872
publish_dir: ./website/build
@@ -877,6 +889,7 @@ on:
877889
push:
878890
branches:
879891
- main
892+
pull_request:
880893
881894
jobs:
882895
deploy:
@@ -913,6 +926,7 @@ jobs:
913926
914927
- name: Deploy
915928
uses: peaceiris/actions-gh-pages@v3
929+
if: github.ref == 'refs/heads/main'
916930
with:
917931
github_token: ${{ secrets.GITHUB_TOKEN }}
918932
publish_dir: ./site
@@ -933,6 +947,7 @@ on:
933947
push:
934948
branches:
935949
- main
950+
pull_request:
936951
937952
jobs:
938953
deploy:
@@ -943,13 +958,14 @@ jobs:
943958
- name: Setup mdBook
944959
uses: peaceiris/actions-mdbook@v1
945960
with:
946-
mdbook-version: '0.4.5'
961+
mdbook-version: '0.4.8'
947962
# mdbook-version: 'latest'
948963
949964
- run: mdbook build
950965
951966
- name: Deploy
952967
uses: peaceiris/actions-gh-pages@v3
968+
if: github.ref == 'refs/heads/main'
953969
with:
954970
github_token: ${{ secrets.GITHUB_TOKEN }}
955971
publish_dir: ./book
@@ -968,6 +984,7 @@ on:
968984
push:
969985
branches:
970986
- main
987+
pull_request:
971988
972989
jobs:
973990
deploy:
@@ -990,6 +1007,7 @@ jobs:
9901007
9911008
- name: Deploy
9921009
uses: peaceiris/actions-gh-pages@v3
1010+
if: github.ref == 'refs/heads/main'
9931011
with:
9941012
github_token: ${{ secrets.GITHUB_TOKEN }}
9951013
publish_dir: ./build/web
@@ -1008,6 +1026,7 @@ on:
10081026
push:
10091027
branches:
10101028
- main
1029+
pull_request:
10111030
10121031
jobs:
10131032
deploy:
@@ -1035,6 +1054,7 @@ jobs:
10351054

10361055
- name: Deploy
10371056
uses: peaceiris/actions-gh-pages@v3
1057+
if: github.ref == 'refs/heads/main'
10381058
with:
10391059
github_token: ${{ secrets.GITHUB_TOKEN }}
10401060
publish_dir: ./public
@@ -1084,6 +1104,7 @@ on:
10841104
push:
10851105
branches:
10861106
- main
1107+
pull_request:
10871108

10881109
jobs:
10891110
deploy:
@@ -1115,6 +1136,7 @@ jobs:
11151136

11161137
- name: Deploy to GitHub Pages
11171138
uses: peaceiris/actions-gh-pages@v3
1139+
if: github.ref == 'refs/heads/main'
11181140
with:
11191141
github_token: ${{ secrets.GITHUB_TOKEN }}
11201142
publish_dir: ./Output

0 commit comments

Comments
 (0)