File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5656 uses : actions/upload-pages-artifact@v3
5757 with :
5858 path : ./public
59+ - name : Test website pages
60+ if : github.event_name == 'pull_request'
61+ run : |
62+ nohup make all-dev &
63+ sleep 5
64+ make test
5965
6066 - name : Deploy
6167 uses : peaceiris/actions-gh-pages@v4
Original file line number Diff line number Diff line change @@ -6,15 +6,29 @@ compile-site:
66 hugo
77 echo " Website generated"
88
9- serve-site-dev :
10- echo " Serving website"
11- hugo server --bind=0.0.0.0
12-
139compile-assets :
1410 echo " Compiling assets"
1511 cd themes/conventional-branch && npm install && npm run build
1612 echo " Assets compiled"
1713
14+ serve-site-dev :
15+ echo " Serving website"
16+ hugo server --bind=0.0.0.0
17+
1818compile-assets-dev :
1919 echo " Compiling assets"
2020 cd themes/conventional-branch && npm install && npm run start &
21+
22+ test :
23+ @echo " Running site tests against http://localhost:1313/ ..."
24+ @pages=" \
25+ http://localhost:1313/ \
26+ http://localhost:1313/zh/ \
27+ http://localhost:1313/about/ \
28+ http://localhost:1313/# summary \
29+ http://localhost:1313/# specification" ;\
30+ for page in $$ pages; do \
31+ echo -n " Testing $$ page ... " ; \
32+ curl -sSf -o /dev/null $$ page && echo " ✅ OK" || (echo " ❌ FAILED" ; exit 1); \
33+ done
34+
Original file line number Diff line number Diff line change @@ -9,4 +9,4 @@ services:
99 - " 1313:1313"
1010 working_dir : /src/
1111 volumes :
12- - ./:/src/
12+ - ./:/src/
You can’t perform that action at this time.
0 commit comments