File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6767
6868 - name: Test Site
6969 run: |
70- bash tools/test.sh "$SPEC_TEST"
71-
70+ if [[ -n $SPEC_TEST ]]; then
71+ bash tools/test.sh -d "$SPEC_TEST"
72+ else
73+ bash tools/test.sh
74+ fi
75+
7276 - name: Deploy
7377 run: |
7478 bash tools/deploy.sh
Original file line number Diff line number Diff line change @@ -22,8 +22,9 @@ help() {
2222 echo " bash ./tools/test.sh [options]"
2323 echo
2424 echo " Options:"
25- echo " --build Run jekyll build before testing."
26- echo " -h, --help Print this information."
25+ echo " --build Run Jekyll build before test."
26+ echo " -d, --dir <path> Specify the test path."
27+ echo " -h, --help Print this information."
2728}
2829
2930if [[ -n $1 && -d $1 ]]; then
@@ -37,6 +38,16 @@ while (($#)); do
3738 _build=true
3839 shift
3940 ;;
41+ -d | --dir)
42+ if [[ ! -d $2 ]]; then
43+ echo -e " Error: path '$2 ' doesn't exist\n"
44+ help
45+ exit 1
46+ fi
47+ DEST=$2
48+ shift
49+ shift
50+ ;;
4051 -h | --help)
4152 help
4253 exit 0
You can’t perform that action at this time.
0 commit comments