This document contains instructions and guidelines for maintainer tasks, like publishing and deploying new versions of the Guides.
Whenever a PR is merged into master
, Travis will automatically run the scripts that build the app and upload the results to Netlify. Netlify will then deploy the site. We currently allow only one Travis job at a time so that concurrent deploy commands do not cause a conflict.
Whenever the release blog post is published for a new version of Ember, follow these steps.
Check briefly to see if there are any PRs that should be merged into /release/
, so that they are applied to both the new version we are about to deploy, and the previous version.
It is required that all maintainers use 2FA (two factor authentication). These are the permissions needed for a deployment of the Guides:
- Merge permissions on the repository
- Percy dashboard
- Clone the guides-source repository to your local machine
- Make sure you have a clean git history with
git status
- Get the latest commits on
master
usinggit pull origin master
- Make a branch, i.e.
git checkout -b release-new-version
- Create a directory in
guides
for the version that is one less than the "lastest." For example, if the newest release of Ember is3.9
, you will make a directory for3.8
that is a copy ofrelease
.mkdir guides/vX.Y.0
- Copy the contents of
guides/release/
into the new directory,cp -r release/* vX.Y.0/
- Edit
versions.yml
- add the version number to both the end of the list and thecurrentVersion
. The last item andcurrentVersion
should match. - Double check that the new directory that you made is the latest release minus one. Commit the changes and push your branch.
- Create a PR, and in the comments, mention that when it is merged, the person who merges it must update the guides search ASAP, and include a link to this page for instructions. Look at the app in staging, get a review, and merge to
master
. This will trigger an auto deployment. - Once it is deployed, follow the steps below to get the website search working for your new version.
Currently getting the new version indexed and put in Algolia is a manual step. There is currently work going on to try to make this automatic, see the tracking issue here to follow along with progress.
Before we get started you need to login to the Algolia dashboard to get the API key. You login, click API Keys
and then copy Write API Key
. Once you have it you need to create the file config/credentials.json
with the following content:
{
"algoliaKey": "<algolia-key>",
"algoliaIndex": "ember-guides",
"algoliaApplication": "Y1OMR4C7MF"
}
Next let's make sure that you have pulled the latest changes after the new version PR has been merged into master
git checkout master
git pull
Next, make sure that you don't have any local changes using git stash
because we're going to be a bit destructive (temporarily)
- Delete all guides folders apart from
release
i.e. everything that starts with av
- cd guides
- rm -rf v*
- Open versions.yml and delete everything in
allVersions
apart from the latest version (that has just been released) - Make sure
config/credentials.json
is in place as described above
- you may have accidentally deleted this since last time as it is supposed to be ignored by git
- Open
config/deploy.js
and delete theversionsToIgnore
line in theprember-algolia
config - run
ember deploy production
- This should now be done, you can fix your local repo by running
git reset --hard HEAD
- Before you walk away, you should check the guides app in production and see if you can search for something on the latest version
- Party some more 🎉and let the rest of the team know that the updates have been made.