Skip to content

DerekNonGeneric/amp-samples

Repository files navigation

amp-samples

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!

Features

  • Auto-deploys built products to gh-pages with Travis
  • Deploys from branch specified in config

Instructions

  1. Fork this repo
  2. Create a new branch for your component's samples
  3. Sign up for Travis and add your repository
  4. Run ssh-keygen -t rsa -b 4096 -C "[email protected]"
  5. For the first dialogue of this command enter: ./deploy_key
  6. For the second dialogue of this command press enter (leave blank)
  7. Add the contents of deploy_key.pub to your repository at https://github.com/<username>/<repo>/settings/keys
  8. Run travis encrypt-file deploy_key
  9. Copy the encryption label (i.e for $encrypted_0a6446eb3ae3_key, it would be 0a6446eb3ae3)
  10. Manually define the ENCRYPTION_LABEL and COMMIT_AUTHOR_EMAIL variables in the Travis Repository Settings
  11. Manually edit the branchName and host variables in the /tasks/config.js file
  12. Add your samples to the /samples/src/ directory
  13. Commit and push
  14. Allow the Travis build to complete
  15. View live samples at https://username.github.io/amp-samples/samples/ampcomponent.basic-sample.preview.html

Releases

No releases published

Sponsor this project

 

Packages

No packages published