Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deploy Aurelia to GitHub Pages (gh-pages)

I haven't seen demos of Aurelia running in GitHub pages. I wonder if there's a gist or a repo somewhere that shows how it can be done.

Is it just a matter of configuring gulp or is there another solution?

like image 563
amitaibu Avatar asked Apr 23 '15 18:04

amitaibu


1 Answers

Here is the solution using the Aurelia navigation skeleton project as an example when created into your organization as a repository as aurelia-skeleton-navigation.

Important Note: This is NOT a production solution. This is for showing how to run Aurelia within GitHub pages using an Aurelia repository that uses Gulp. It is recommended to read about jspm bundling an Aurelia app for deployment.

Start a git command line after you unzip the current release of the skeleton-navigation into aurelia-skeleton-navigation directory.

Locally from a git and npm command line:

cd <path>/aurelia-skeleton-navigation

git init

git remote add origin [email protected]:yourorg/aurelia-skeleton-navigation.git

git fetch --all

git add *

git commit -m 'initial commit'

git push origin master

git branch gh-pages

git checkout gh-pages

edit .gitignore and comment out the jspm_packages and dist paths

node_modules
# jspm_packages
bower_components
.idea
.DS_STORE
# /dist

jspm install

npm install

gulp build

git add *

git commit -m 'adding resources'

git push origin gh-pages

Navigate to your repository GitHub page:
http://yourorg.github.io/aurelia-skeleton-navigation

Updating the app on GitHub Pages

Once you make changes to your app in the master branch, you can merge those changes into your gh-pages and publish:

  • git checkout gh-pages

  • git merge master

  • gulp build

  • git add *

  • git commit -m 'updates'

  • git push origin gh-pages

like image 67
talves Avatar answered Oct 14 '22 07:10

talves