Skip to content

Instantly share code, notes, and snippets.

@Jaid
Last active June 24, 2019 06:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jaid/284917bd3e938add97b699a18b957d8c to your computer and use it in GitHub Desktop.
Save Jaid/284917bd3e938add97b699a18b957d8c to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -e
set -o errexit
npm install --global pover
pover install
pover build:dev
pover build:prod
pover test
#!/usr/bin/env bash
set -e
set -o errexit
npm install --global pover
pover install
pover build:dev
pover build:prod
if [ ! -z $NPM_TOKEN ]
then
touch ~/deployNpm
fi
if [ ! -z $GITHUB_TOKEN ]
then
npx compile-release
touch ~/deployReleases
fi
if [ -f dist/package/production/index.html ]
then
# GitHub Pages
cp --recursive dist/package/production dist/page
cp dist/page/index.html dist/page/404.html
# Surge
if [ ! -z $SURGE_TOKEN ]
then
cp --recursive dist/package/production dist/surge
cp dist/surge/index.html dist/surge/200.html
rm dist/surge/index.html
npx surge dist/surge $(npx package-field-cli domain)
fi
fi
if [ -d dist/page ]
then
touch ~/deployPage
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment