Skip to content

Commit 57052b8

Browse files
committed
Run deploy.sh on PRs as well
This regressed in #321.
1 parent 988c10c commit 57052b8

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

.github/workflows/deploy.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
name: deploy
22
on:
3+
pull_request:
4+
branches:
5+
- master
36
push:
47
branches:
5-
- master
8+
- master
69
jobs:
710
deploy:
811
runs-on: ubuntu-20.04

deploy.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ copy_logo "samsung-internet/samsung-internet.svg" "samsung.svg"
4242
copy_logo "uc/uc_32x32.png" "uc.png"
4343
echo ""
4444

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
4747
header "Running the HTML checker..."
4848

4949
# Check the targets given explicitly here, plus most of the extensionless files directly inside
@@ -62,13 +62,13 @@ if [[ "$TRAVIS" == "true" ]]; then
6262
fi
6363

6464
# 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
6866
header "Synchronizing content with whatwg.org et al"
6967
eval "$(ssh-agent -s)"
7068
echo "$SERVER_DEPLOY_KEY" | ssh-add -
7169
mkdir -p ~/.ssh/ && echo "$SERVER $SERVER_PUBLIC_KEY" > ~/.ssh/known_hosts
7270
rsync --verbose --archive --chmod=D755,F644 --compress --delete \
7371
./whatwg.org ./*.whatwg.org "deploy@$SERVER:/var/www/"
72+
else
73+
header "Skipping deploy"
7474
fi

0 commit comments

Comments
 (0)