@@ -42,18 +42,13 @@ copy_logo "samsung-internet/samsung-internet.svg" "samsung.svg"
42
42
copy_logo " uc/uc_32x32.png" " uc.png"
43
43
echo " "
44
44
45
- # Run the HTML checker only when building on Travis
46
- if [[ " $TRAVIS " == " true" ]]; then
45
+ # Run the HTML checker only when building on CI
46
+ if [[ " $GITHUB_ACTIONS " == " true" ]]; then
47
47
header " Running the HTML checker..."
48
48
49
- # Check the targets given explicitly here, plus most of the extensionless files directly inside
50
- # whatwg.org/. This uses https://stackoverflow.com/a/23357277/3191 to get the results of the
51
- # find command into an array. TODO: if Travis CI ever gets Bash 4.4, we can use the simpler
52
- # version at https://stackoverflow.com/a/54561526/3191.
53
- TARGETS=(whatwg.org/news whatwg.org/validator whatwg.org/index.html idea.whatwg.org/index.html spec.whatwg.org/index.html)
54
- while IFS= read -r -d $' \0' ; do
55
- TARGETS+=(" $REPLY " )
56
- done < <( find whatwg.org -maxdepth 1 -type f ! -name " *.*" ! -name " status-2008-12" -print0)
49
+ # Check most of the extensionless files in whatwg.org/, plus targets explicitly listed.
50
+ readarray -d ' ' TARGETS < <( find whatwg.org -maxdepth 1 -type f ! -name " *.*" ! -name " status-2008-12" -print0)
51
+ TARGETS+=(whatwg.org/news whatwg.org/validator whatwg.org/index.html idea.whatwg.org/index.html spec.whatwg.org/index.html)
57
52
58
53
curl --retry 2 --fail --remote-name --location https://github.com/validator/validator/releases/download/linux/vnu.linux.zip
59
54
unzip -qq vnu.linux.zip
@@ -62,13 +57,13 @@ if [[ "$TRAVIS" == "true" ]]; then
62
57
fi
63
58
64
59
# This ensures that only changes to the master branch get deployed
65
- if [[ " $GITHUB_REF " != " refs/heads/master" ]]; then
66
- header " Skipping deploy"
67
- else
60
+ if [[ " $GITHUB_EVENT_NAME " == " push" && " $GITHUB_REF " == " refs/heads/master" ]]; then
68
61
header " Synchronizing content with whatwg.org et al"
69
62
eval " $( ssh-agent -s) "
70
63
echo " $SERVER_DEPLOY_KEY " | ssh-add -
71
64
mkdir -p ~ /.ssh/ && echo " $SERVER $SERVER_PUBLIC_KEY " > ~ /.ssh/known_hosts
72
65
rsync --verbose --archive --chmod=D755,F644 --compress --delete \
73
66
./whatwg.org ./* .whatwg.org " deploy@$SERVER :/var/www/"
67
+ else
68
+ header " Skipping deploy"
74
69
fi
0 commit comments