adding publish.sh

it will trigger a build on vercel
This commit is contained in:
joeaba 2021-10-14 17:20:10 +05:30 committed by GitHub
parent 5483d6684e
commit 47ef12f19b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 23 additions and 0 deletions

23
explorer/publish.sh Normal file
View File

@ -0,0 +1,23 @@
#!/usr/bin/env bash
set -ex
if [[ -d .vercel ]]; then
rm -r .vercel
fi
CONFIG_FILE=vercel.json
PROJECT_NAME=explorer
cat > "$CONFIG_FILE" <<EOF
{
"name": "$PROJECT_NAME",
"scope": "solana-lab"
}
EOF
[[ -n $VERCEL_TOKEN ]] || {
echo "VERCEL_TOKEN is undefined. Needed for Vercel authentication."
exit 1
}
vercel deploy . --local-config="$CONFIG_FILE" --confirm --token "$VERCEL_TOKEN"