134
134
push:
135
135
branches:
136
136
- main # Set a branch name to trigger deployment
137
+ pull_request:
137
138
138
139
jobs:
139
140
deploy:
@@ -147,13 +148,14 @@ jobs:
147
148
- name: Setup Hugo
148
149
uses: peaceiris/actions-hugo@v2
149
150
with:
150
- hugo-version: '0.79 .1'
151
+ hugo-version: '0.83 .1'
151
152
152
153
- name: Build
153
154
run: hugo --minify
154
155
155
156
- name: Deploy
156
157
uses: peaceiris/actions-gh-pages@v3
158
+ if: github.ref == 'refs/heads/main'
157
159
with:
158
160
github_token: ${{ secrets.GITHUB_TOKEN }}
159
161
publish_dir: ./public
631
633
push:
632
634
branches:
633
635
- main
636
+ pull_request:
634
637
635
638
jobs:
636
639
deploy:
@@ -656,6 +659,7 @@ jobs:
656
659
657
660
- name: Deploy
658
661
uses: peaceiris/actions-gh-pages@v3
662
+ if: github.ref == 'refs/heads/main'
659
663
with:
660
664
github_token: ${{ secrets.GITHUB_TOKEN }}
661
665
publish_dir: ./public
675
679
push:
676
680
branches:
677
681
- main
682
+ pull_request:
678
683
679
684
jobs:
680
685
deploy:
@@ -702,6 +707,7 @@ jobs:
702
707
703
708
- name: Deploy
704
709
uses: peaceiris/actions-gh-pages@v3
710
+ if: github.ref == 'refs/heads/main'
705
711
with:
706
712
github_token: ${{ secrets.GITHUB_TOKEN }}
707
713
publish_dir: ./public
723
729
push:
724
730
branches:
725
731
- main
732
+ pull_request:
726
733
727
734
jobs:
728
735
deploy:
@@ -753,6 +760,7 @@ jobs:
753
760
754
761
- name: Deploy
755
762
uses: peaceiris/actions-gh-pages@v3
763
+ if: github.ref == 'refs/heads/main'
756
764
with:
757
765
github_token: ${{ secrets.GITHUB_TOKEN }}
758
766
publish_dir: ./out
774
782
push:
775
783
branches:
776
784
- main
785
+ pull_request:
777
786
778
787
jobs:
779
788
deploy:
@@ -800,6 +809,7 @@ jobs:
800
809
801
810
- name: deploy
802
811
uses: peaceiris/actions-gh-pages@v3
812
+ if: github.ref == 'refs/heads/main'
803
813
with:
804
814
github_token: ${{ secrets.GITHUB_TOKEN }}
805
815
publish_dir: ./dist
823
833
paths:
824
834
- '.github/workflows/deploy.yml'
825
835
- 'website/**'
836
+ pull_request:
826
837
827
838
jobs:
828
839
deploy:
@@ -855,6 +866,7 @@ jobs:
855
866
856
867
- name: Deploy
857
868
uses: peaceiris/actions-gh-pages@v3
869
+ if: github.ref == 'refs/heads/main'
858
870
with:
859
871
github_token: ${{ secrets.GITHUB_TOKEN }}
860
872
publish_dir: ./website/build
877
889
push:
878
890
branches:
879
891
- main
892
+ pull_request:
880
893
881
894
jobs:
882
895
deploy:
@@ -913,6 +926,7 @@ jobs:
913
926
914
927
- name: Deploy
915
928
uses: peaceiris/actions-gh-pages@v3
929
+ if: github.ref == 'refs/heads/main'
916
930
with:
917
931
github_token: ${{ secrets.GITHUB_TOKEN }}
918
932
publish_dir: ./site
933
947
push:
934
948
branches:
935
949
- main
950
+ pull_request:
936
951
937
952
jobs:
938
953
deploy:
@@ -943,13 +958,14 @@ jobs:
943
958
- name: Setup mdBook
944
959
uses: peaceiris/actions-mdbook@v1
945
960
with:
946
- mdbook-version: '0.4.5 '
961
+ mdbook-version: '0.4.8 '
947
962
# mdbook-version: 'latest'
948
963
949
964
- run: mdbook build
950
965
951
966
- name: Deploy
952
967
uses: peaceiris/actions-gh-pages@v3
968
+ if: github.ref == 'refs/heads/main'
953
969
with:
954
970
github_token: ${{ secrets.GITHUB_TOKEN }}
955
971
publish_dir: ./book
968
984
push:
969
985
branches:
970
986
- main
987
+ pull_request:
971
988
972
989
jobs:
973
990
deploy:
@@ -990,6 +1007,7 @@ jobs:
990
1007
991
1008
- name: Deploy
992
1009
uses: peaceiris/actions-gh-pages@v3
1010
+ if: github.ref == 'refs/heads/main'
993
1011
with:
994
1012
github_token: ${{ secrets.GITHUB_TOKEN }}
995
1013
publish_dir: ./build/web
@@ -1008,6 +1026,7 @@ on:
1008
1026
push:
1009
1027
branches:
1010
1028
- main
1029
+ pull_request:
1011
1030
1012
1031
jobs:
1013
1032
deploy:
@@ -1035,6 +1054,7 @@ jobs:
1035
1054
1036
1055
- name : Deploy
1037
1056
uses : peaceiris/actions-gh-pages@v3
1057
+ if : github.ref == 'refs/heads/main'
1038
1058
with :
1039
1059
github_token : ${{ secrets.GITHUB_TOKEN }}
1040
1060
publish_dir : ./public
@@ -1084,6 +1104,7 @@ on:
1084
1104
push :
1085
1105
branches :
1086
1106
- main
1107
+ pull_request :
1087
1108
1088
1109
jobs :
1089
1110
deploy :
@@ -1115,6 +1136,7 @@ jobs:
1115
1136
1116
1137
- name : Deploy to GitHub Pages
1117
1138
uses : peaceiris/actions-gh-pages@v3
1139
+ if : github.ref == 'refs/heads/main'
1118
1140
with :
1119
1141
github_token : ${{ secrets.GITHUB_TOKEN }}
1120
1142
publish_dir : ./Output
0 commit comments