#!/bin/bash -eu # This script builds a new gh-pages branch from latest master read -p "This script will delete all untracked files in the VE folder. Continue (y/n)? " -n 1 -r echo if [[ ! $REPLY =~ ^[Yy]$ ]] then exit 0 fi cd "$(dirname $0)/.." git fetch origin git checkout -B gh-pages origin/master git reset --hard origin/master git clean -dffx # Run npm-install to fetch qunitjs and build dist/ npm install html=' VisualEditor
VisualEditor logo
Demo
Test suite
' echo "$html" > index.html # Disable Jekyll default settings for GitHub Pages # as otherwise node_modules/qunitjs will not be published. # https://help.github.com/articles/files-that-start-with-an-underscore-are-missing/ # https://www.bennadel.com/blog/3181-including-node-modules.htm touch .nojekyll git add index.html .nojekyll git add -f node_modules/qunit dist/ git commit -m "Create gh-pages branch" git push origin -f HEAD