Skip to content

Commit cf6ff4c

Browse files
authored
reinstall ssh private keys from GH secrets (#8245)
1 parent 096c008 commit cf6ff4c

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

package/deploy_package_index.sh

+11-1
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,23 @@ cd $(dirname "$0")
1010

1111
set -e # Abort with error if anything here does not go as expected!
1212

13+
# Install SSH private key from a GH Secret
14+
echo $GHCI_DEPLOY_KEY | base64 -d > esp8266_github_io_deploy
15+
eval "$(ssh-agent -s)"
16+
chmod 600 esp8266_github_io_deploy
17+
ssh-add esp8266_github_io_deploy
18+
mkdir -p ~/.ssh
19+
chmod go-w ~/.ssh
20+
echo -e "Host github.com\nStrictHostKeyChecking no\n" >> ~/.ssh/config
21+
chmod go-w ~/.ssh/config
22+
1323
# Clone the Github pages repository
1424
git clone git@github.com:esp8266/esp8266.github.io.git
1525
pushd esp8266.github.io
1626

1727
# Copy from published release, ensure JSON valid
1828
rm -f stable/package_esp8266com_index.json
19-
wget "https://github.com/esp8266/Arduino/releases/download/"$tag"/package_esp8266com_index.json" -O stable/package_esp8266com_index.json
29+
wget https://github.com/esp8266/Arduino/releases/download/$tag/package_esp8266com_index.json -O stable/package_esp8266com_index.json
2030
cat stable/package_esp8266com_index.json | jq empty
2131

2232
git add stable/package_esp8266com_index.json

0 commit comments

Comments
 (0)