File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 1
1
name : deploy
2
2
on :
3
+ pull_request :
4
+ branches :
5
+ - master
3
6
push :
4
7
branches :
5
- - master
8
+ - master
6
9
jobs :
7
10
deploy :
8
11
runs-on : ubuntu-20.04
Original file line number Diff line number Diff line change @@ -42,8 +42,8 @@ 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
49
# Check the targets given explicitly here, plus most of the extensionless files directly inside
@@ -62,13 +62,13 @@ if [[ "$TRAVIS" == "true" ]]; then
62
62
fi
63
63
64
64
# 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
65
+ if [[ " $GITHUB_EVENT_NAME " == " push" && " $GITHUB_REF " == " refs/heads/master" ]]; then
68
66
header " Synchronizing content with whatwg.org et al"
69
67
eval " $( ssh-agent -s) "
70
68
echo " $SERVER_DEPLOY_KEY " | ssh-add -
71
69
mkdir -p ~ /.ssh/ && echo " $SERVER $SERVER_PUBLIC_KEY " > ~ /.ssh/known_hosts
72
70
rsync --verbose --archive --chmod=D755,F644 --compress --delete \
73
71
./whatwg.org ./* .whatwg.org " deploy@$SERVER :/var/www/"
72
+ else
73
+ header " Skipping deploy"
74
74
fi
You can’t perform that action at this time.
0 commit comments