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 "your_email@example.com" - 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.pubto 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_LABELandCOMMIT_AUTHOR_EMAILvariables in the Travis Repository Settings - Manually edit the
branchNameandhostvariables in the/tasks/config.jsfile - 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