https://github.com/dereknongeneric/amp-samples
Boilerplate for adding embedded samples in AMP docs
https://github.com/dereknongeneric/amp-samples
Last synced: 11 months ago
JSON representation
Boilerplate for adding embedded samples in AMP docs
- Host: GitHub
- URL: https://github.com/dereknongeneric/amp-samples
- Owner: DerekNonGeneric
- Created: 2017-06-13T15:01:24.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2025-06-05T22:32:07.000Z (12 months ago)
- Last Synced: 2025-06-05T23:27:21.638Z (12 months ago)
- Language: Shell
- Homepage: https://dereknongeneric.github.io/amp-samples/samples/ampsort.basic-table.embed.html
- Size: 70.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# amp-samples
Boilerplate for adding embedded samples in AMP docs. Based on [How to: Include embedded samples in AMP docs](https://github.com/ampproject/docs/blob/master/contributing/adding-embedded-samples-in-docs.md) by [Barb Paduch](https://github.com/bpaduch).
**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
1. Create a new branch for your component's samples
1. Sign up for Travis and add your repository
1. Run `ssh-keygen -t rsa -b 4096 -C "your_email@example.com"`
1. For the first dialogue of this command enter: `./deploy_key`
1. For the second dialogue of this command press enter (leave blank)
1. Add the contents of `deploy_key.pub` to your repository at `https://github.com///settings/keys`
1. Run `travis encrypt-file deploy_key`
1. Copy the encryption label (i.e for `$encrypted_0a6446eb3ae3_key`, it would be `0a6446eb3ae3`)
1. Manually define the `ENCRYPTION_LABEL` and `COMMIT_AUTHOR_EMAIL` variables in the Travis Repository Settings
1. Manually edit the `branchName` and `host` variables in the `/tasks/config.js` file
1. Add your samples to the `/samples/src/` directory
1. Commit and push
1. Allow the Travis build to complete
1. View live samples at https://username.github.io/amp-samples/samples/ampcomponent.basic-sample.preview.html