Boilerplate for adding embedded samples in AMP docs. Based on How to: Include embedded samples in AMP docs by Barb Paduch.
WARNING: A new method exists. Update coming soon!
- Auto-deploys built products to gh-pages with Travis
- Deploys from branch specified in config
- Fork this repo
- Create a new branch for your component's samples
- Sign up for Travis and add your repository
- Run
ssh-keygen -t rsa -b 4096 -C "[email protected]"
- For the first dialogue of this command enter:
./deploy_key
- For the second dialogue of this command press enter (leave blank)
- Add the contents of
deploy_key.pub
to your repository athttps://github.com/<username>/<repo>/settings/keys
- Run
travis encrypt-file deploy_key
- Copy the encryption label (i.e for
$encrypted_0a6446eb3ae3_key
, it would be0a6446eb3ae3
) - Manually define the
ENCRYPTION_LABEL
andCOMMIT_AUTHOR_EMAIL
variables in the Travis Repository Settings - Manually edit the
branchName
andhost
variables in the/tasks/config.js
file - Add your samples to the
/samples/src/
directory - Commit and push
- Allow the Travis build to complete
- View live samples at https://username.github.io/amp-samples/samples/ampcomponent.basic-sample.preview.html