Skip to content

Instantly share code, notes, and snippets.

@gremito
Created July 4, 2020 18:39
Show Gist options
  • Save gremito/e069557e8855c12213fb7b58a7ca35fe to your computer and use it in GitHub Desktop.
Save gremito/e069557e8855c12213fb7b58a7ca35fe to your computer and use it in GitHub Desktop.
ビルドしたvueソースをfirebase hostingへデプロイするスクリプト
#!/bin/sh
cd "${APP_NAME}"-vue
npm run build
cd ../
TGZ_NAME=./deploy-`date +"%Y-%m-%d-%H:%M"`.tgz
tar -czvf "${TGZ_NAME}" "${APP_NAME}"-firebase/public
if [[ ! -e "${TGZ_NAME}" ]]; then
echo "ERROR: ${TGZ_NAME} could not be created."
exit 1
fi
cp -r "${APP_NAME}"-vue/dist/ "${APP_NAME}"-firebase/public
cd "${APP_NAME}"-firebase
firebase deploy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment