Changes

Jump to: navigation, search

OSD600 and DPS909 Winter 2018 Lab 7

2,733 bytes added, 14:04, 11 April 2018
Created page with "=Traivs CI and Deployment to GH-Pages= This week we're looking at Continuous Integration with cloud services like Travis CI. We'll use Travis CI to setup automatic deploymen..."
=Traivs CI and Deployment to GH-Pages=

This week we're looking at Continuous Integration with cloud services like Travis CI. We'll use Travis CI to setup automatic deployment of our Bridge Troll web app to GitHub's gh-pages hosting service.

In this lab, you are asked to add automation and deployment configuration to your clone of bridge troll in order to learn how to use Travis CI for automatic deployment of code to the web. We'll also learn how to use GitHub for static hosting of web apps.

==1. Update your Bridge Troll Fork==

Make sure you're running the latest version of my repo. To do this, update your version like so:

<code>
git fetch upstream
git checkout -B master upstream/master
</code>

This will download the latest commits from my upstream repo, and reset your <code>master</code> branch to be the same as mine.

==2. Enable Traivs CI for your Fork==

Everything you'll do in this lab will be done on your own personal fork (i.e., you aren't going to send me a pull request).

First, login to travis-ci.org with your GitHub account.

Second, enable your bridge-troll repo in the list of repos that Travis is connected to.

==3. Add Deployment Step==

In the <code>.travis.yml</code> file, you'll need to add steps for deployment to GH-Pages.

Follow the instructions:

* https://docs.travis-ci.com/user/deployment/
* https://docs.travis-ci.com/user/deployment/pages/

NOTE: you may need to alter the Travis build script in order to run <code>npm run build</code>. This creates the production <code>dist/</code> folder. For example, you might choose to do this during the [https://docs.travis-ci.com/user/customizing-the-build/#The-Build-Lifecycle before deploy] step.

==4. Confirm Your Deploy==

When you have successfully deployed to GH-Pages, you should be able to visit your gh-pages URL and see your code live on the web. See docs in https://help.github.com/categories/github-pages-basics/.

==8. Submission==

Submit a link to your forked repo's <code>.travis.yml</code> file, and also a link to your forked version of bridge troll running on gh-pages.

{| class="wikitable"
! #
! Name
! .travis.yml file (URL)
! Bridge Troll on GH-Pages (URL)
|-
| 1
|
|
|
|-
| 2
|
|
|
|-
| 3
|
|
|
|-
| 4
|
|
|
|-
| 5
|
|
|
|-
| 6
|
|
|
|-
| 7
|
|
|
|-
| 8
|
|
|
|-
| 9
|
|
|
|-
| 10
|
|
|
|-
| 11
|
|
|
|-
| 12
|
|
|
|-
| 13
|
|
|
|-
| 14
|
|
|
|-
| 15
|
|
|
|-
| 16
|
|
|
|-
| 17
|
|
|
|-
| 18
|
|
|
|-
| 19
|
|
|
|-
| 20
|
|
|
|-
| 21
|
|
|
|-
| 22
|
|
|
|-
| 23
|
|
|
|-
| 24
|
|
|
|-
| 25
|
|
|
|-
| 26
|
|
|
|-
| 27
|
|
|
|-
| 28
|
|
|
|-
| 29
|
|
|
|-
| 30
|
|
|
|-
| 31
|
|
|
|-
| 32
|
|
|
|-
| 33
|
|
|
|-
| 34
|
|
|
|-
| 35
|
|
|
|-
| 36
|
|
|
|-
| 37
|
|
|
|-
| 38
|
|
|
|-
| 39
|
|
|
|-
| 40
|
|
|
|-

Navigation menu