Skip to content

Instantly share code, notes, and snippets.

@adufilie
Last active May 14, 2019 21:22
Show Gist options
  • Save adufilie/660cd7a06433133d44db548d9652a993 to your computer and use it in GitHub Desktop.
Save adufilie/660cd7a06433133d44db548d9652a993 to your computer and use it in GitHub Desktop.
Script for publishing adaptivecards/source/nodejs/adaptivecards-visualizer on gh-pages branch
#!/bin/bash
set -e\
git reset --soft master
rm -rf source
git checkout master -- source
echo "<script>window.location = \"source/nodejs/adaptivecards-visualizer\"</script>" > index.html
touch .nojekyll # enables publishing node_modules
pushd source/nodejs/adaptivecards
npm install
npm run build
popd
pushd source/nodejs/adaptivecards-visualizer
npm install adaptivecards@../adaptivecards
npm install
npm run build-all
pushd node_modules
git add -f adaptivecards/dist monaco-editor/min/vs monaco-editor/min-maps/vs ../dist
popd
popd
git add .
git commit -m "gh-pages"
git push -f
git checkout master
rm -rf source
git checkout master -- source
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment