Deploying from your local machine using Pagefront is super easy and works great. However, if you prefer to continuously deploy your app using a service like Codeship, CircleCI or Travis CI, Pagefront will work just as seamlessly. For each of the guides below, we assume that you have already set up the continuous integration part with the relevant service and now just need to set up the continuous deployment part.

Codeship

Create API Key

Navigate to your account settings in the Pagefront dashboard and click on "Access" in the top nav. Once there you should see "API Keys":

API Keys

There will likely be a single "CLI" API key unless you've added others. This "CLI" API key is what your local machine uses to deploy to Pagefront. Let's go ahead and add another API key specifically for Codeship.

Click the "Add button", enter "Codeship" for the "Client" field and click the "Create" button. Your new "Codeship" API key should now show up:

Added Codeship API Key

Copy the key (the "[YOUR NEW API KEY SPECIFICALLY FOR CODESHIP]" part from the above screenshot) and head on over to Codeship to finish the set up.

Configure Codeship

Navigate to your project's "Deployment" settings within Codeship and create a new deployment pipeline if you do not already have one. Then go ahead and select the "Custom Script" deployment:

Codeship Custom Script

For the custom script deployment command, simply enter ember deploy production:

Codeship Deployment Command

Then click the "Create" button. Now we just need to set our Pagefront API key.

Navigate to your projects "Environment" settings. Add a new environment variable named "PAGEFRONT_KEY" with the API key you created in the previous section:

Codeship Environment Variable

Click the "Save Changes" button. You are now ready to go! Next time you push code, your app will automatically be deployed to Pagefront. Give it a try!

CircleCI

Create API Key

Navigate to your account settings in the Pagefront dashboard and click on "Access" in the top nav. Once there you should see "API Keys":

API Keys

There will likely be a single "CLI" API key unless you've added others. This "CLI" API key is what your local machine uses to deploy to Pagefront. Let's go ahead and add another API key specifically for CircleCI.

Click the "Add button", enter "CircleCI" for the "Client" field and click the "Create" button. Your new "CircleCI" API key should now show up:

Added CircleCI API Key

Copy the key (the "[YOUR NEW API KEY SPECIFICALLY FOR CIRCLECI]" part from the above screenshot) and head on over to CircleCI to finish the set up.

Configure CircleCI

Navigate to your project's settings within CircleCI and click on "Environment variables" under "Tweaks." Add a new environment variable named "PAGEFRONT_KEY" with the API key you created in the previous section:

CircleCI Environment Variable

Click the "Save variables" button.

Now we just need to setup up the deployment part. To do this, you'll need to add a cirlce.yml file to your app with the following contents:

dependencies:
  pre:
    - npm install -g bower
  override:
    - npm install
    - bower install
deployment:
  production:
    branch: master
    commands:
      - ./node_modules/.bin/ember deploy production

You are now ready to go! Next time you push code, your app will automatically be deployed to Pagefront. Give it a try!

Travis CI

Create API Key

Navigate to your account settings in the Pagefront dashboard and click on "Access" in the top nav. Once there you should see "API Keys":

API Keys

There will likely be a single "CLI" API key unless you've added others. This "CLI" API key is what your local machine uses to deploy to Pagefront. Let's go ahead and add another API key specifically for Travis CI.

Click the "Add button", enter "Travis CI" for the "Client" field and click the "Create" button. Your new "Travis CI" API key should now show up:

Added Travis CI API Key

Copy the key (the "[YOUR NEW API KEY SPECIFICALLY FOR TRAVIS CI]" part from the above screenshot) as we will need that in just a moment.

Configure Travis CI

Ember-CLI projects come with a .travis.yml file by default, so we just need to add the deployment part to this existing file:

deploy:
  provider: script
  script: ember deploy production
  skip_cleanup: true

Make sure you have the Travis CLI installed (gem install travis if you don't) and run the following command to add your encrypted API key to the config:

  travis encrypt PAGEFRONT_KEY=[YOUR NEW PAGEFRONTAPI KEY] --add env.global

You are now ready to go! Next time you push code, your app will automatically be deployed to Pagefront. Give it a try!