Skip to content

reinstall ssh private keys from GH secrets #8245

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion package/deploy_package_index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,23 @@ cd $(dirname "$0")

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

# Install SSH private key from a GH Secret
echo $GHCI_DEPLOY_KEY | base64 -d > esp8266_github_io_deploy
eval "$(ssh-agent -s)"
chmod 600 esp8266_github_io_deploy
ssh-add esp8266_github_io_deploy
mkdir -p ~/.ssh
chmod go-w ~/.ssh
echo -e "Host github.com\nStrictHostKeyChecking no\n" >> ~/.ssh/config
chmod go-w ~/.ssh/config

# Clone the Github pages repository
git clone [email protected]:esp8266/esp8266.github.io.git
pushd esp8266.github.io

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

git add stable/package_esp8266com_index.json
Expand Down