forked from tc39/proposal-optional-chaining
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.sh
executable file
·28 lines (20 loc) · 871 Bytes
/
deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
set -ev
# Enable SSH authentication
ENCRYPTED_KEY_VAR="encrypted_${ENCRYPTION_LABEL}_key"
ENCRYPTED_IV_VAR="encrypted_${ENCRYPTION_LABEL}_iv"
ENCRYPTED_KEY=${!ENCRYPTED_KEY_VAR}
ENCRYPTED_IV=${!ENCRYPTED_IV_VAR}
if [[ $ENCRYPTED_KEY == "" ]]; then
echo "Auto-deploy GitHub key missing; exiting without a build"
exit 0
fi
$(npm bin)/set-up-ssh --key "$ENCRYPTED_KEY" \
--iv "$ENCRYPTED_IV" \
--path-encrypted-key "$PRIVATE_KEY_FILE_NAME"
# Update the content from the `gh-pages` branch
$(npm bin)/update-branch --commands "mkdir out && ecmarkup spec.html out/index.html" \
--commit-message "Update gh-pages [skip ci]" \
--directory "out" \
--distribution-branch "gh-pages" \
--source-branch "master"