Before you start #
Now that you've built an AMP site locally, you're ready to publish it to the world. To begin with, ensure that
- You can login to Mobify Cloud.
- You have a Project set up on Mobify Cloud.
- You've authorized your computer to push bundles by following the steps on your account page.
You can push and publish AMP bundles to Mobify Cloud, just as you can PWA bundles.
For AMP sites we support two published bundles at a time – a
We recommend that you use the
staging site to share and review changes before
publishing them to
Publishing your site #
To publish a site, use the
bundles command to push a bundle. To do so:
First, run the following command that outputs a built version.
>> npm run build
then, run the following command and replace [BUNDLE_NAME] with the built version from above.
>> npm run bundles -- push ./build/[BUNDLE_NAME].zip --message "My first AMP bundle"
To publish a bundle that you have pushed to Mobify Cloud:
- Log in to Mobify Cloud
- You should see a list of your projects. Click on the name of your project.
- In the left-hand sidebar, click on AMP Bundles
- Find the bundle that you want to publish
- Click the Publish button next to the bundle
- Click Confirm Publish
After a few seconds, you should see the published bundle appear under Published AMP Bundle.
Viewing your site #
We will set up in-development URLs for your AMP site. You can hover on the published bundle and view the bundle on either staging or production.
- Production -
- Staging -
This is the same naming pattern used for our demo site at https://progressive-web-scaffold.amp-mobify.com/.