Gh-pages deployment step failing with newer version of package

I followed the steps outlined in the article here for deploying to gh-pages. However with the latest version of the gh-pages package (2.2.0), the build runs into a failure:

#!/bin/bash -eo pipefail
gh-pages --no-history --dotfiles --dist tmp/dist --branch master --message "Circle CI Updates [ci skip]"
EACCES: permission denied, mkdir '/usr/local/lib/node_modules/gh-pages/.cache'
Exited with code exit status 1
CircleCI received exit code 1

URL of issue on circleci: here

config.yml file: here

Any help is appreciated.

This indicates a permissions error. The default user does not have access to /usr/local, you should either change the permissions in that directory (using chown) or use a different directory.