This article describes how to use our build system to manage your coding workflow and your Moovweb projects using Moov Deploy for the Moovweb SDK version 5 or later.
Deploying is how you take a local Developer Dashboard project and send it to the Moovweb Cloud for hosting and delivery. Developer Dashboard projects are all generated through the “Generate New Project” button on the Developer Dashboard.
When you are ready to deploy a project you’ve tested locally through the Developer Dashboard, you first need to create a Control Center project so there will be a place to receive it in in the Moovweb Cloud, and where you can manage its settings.
To deploy a Developer Dashboard project to a project in the Control Center you use the command line. From the project directory run:
moov deploy <account-name>/<project-name>
For example, if your account name were “exampleuser” and you wanted to deploy a Developer Center project to a Control Center project named “examplesite,” you would enter this command into a terminal from the top level of the Developer Dashboard project directory:
moov deploy exampleuser/examplesite
There are a number of additional options that can be issued as part of a deploy. For example, if your Developer Dashboard project has multiple Layers, you can specify which one you want to deploy. If your Control Center project has different Modes defined, you can say which Mode of the project you are deploying to. You can even define custom pre-deploy scripts and post-deploy scripts that will have access to variables related to the build. You can also pass notes that will display in the Control Center next to a build, set a deploy ID, and more.
For all the details on how to customize your
moov deploy command, check out the deploy documentation, or issue the command
moov deploy help for a full list of available options.
You can see your project info in the Control Center, under your Account Page:
Here you will be able to see the history of versions that have been deployed, and download any version locally as a zip file that you can manage just like any other local project in the Developer Dashboard.
Once you’ve made any desired changes to the project you just downloaded, and updated any version control systems you are using, you are ready to go live, and deploy your code:
moov deploy <account-name>/<site-name>
If this is the first time you are deploying in this session, you may be asked for your Moovweb account credentials so you can access the sites you’ve created.
With just the default options, deploying your code to Moovweb will trigger the build process:
The progress of your build will be displayed in your terminal, something like this: (The specifics may vary depending on how your project is configured.)
---+ Loading Project ---+ Compiling Project | Mixer core-rewriter (2.2.202) successfully loaded. | Mixer stdlib (2.0.171) successfully loaded. | Mixer cache (1.0.149) successfully loaded. | Mixer perf (2.0.133) successfully loaded. | Bundling js files... | Finished bundling js. | Generating sprite-sheets with Spracker. | Compiling Sass assets... | Finished compiling sass. | Compiling project to a slug... | Finished compiling slug. | Slug size: 274515 bytes. | Assets size: 3132022 bytes. ---+ Registering Domains | Validating hosts... | - YOUR HOSTS... | Successfully registered host map. ---+ Deploying Project | Uploading assets to MoovCloud CDN... | Syncing assets across regions... | Uploading project slug to MoovCloud servers. | Syncing across regions... ---+ Build v5 finished successfully
If you want to trigger a new build of an existing Mode, you don’t have to deploy again from your terminal. You can simply hit the rebuild button on any previous build of your project when viewing it in the Control Center. To interact with a specific build of a Mode, click the “Manage” button associated with the Mode in the Project’s Mode listing (Projects Index > projectname).
The main project page contains a list of all the projects in your account. From here you can click the name of the project you wish to manage to view Modes. And to manage your project’s Modes, click on the “Manage” button.
You can keep track of projects by watching them. By hovering over the name of a project on the main project listing page containing a project, you will reveal a “Watch” button on the right side of listing entry.
When you hit the button, you’ll get build notices whenever the following happen:
(Make sure your spam filter doesn’t grab emails from @moovweb.com!)
You can turn emails off by hitting that button again (it will now say “Unwatch”), or you can manage which projects you watch by going to your settings page and choosing “Notifications”.
The project page also has a list of domains that correspond to the project.
Moovweb generates a list of domains based on the config.json file in your project’s source code.
You can also set up a Production Domain with a custom host variable (such as “m.example.com”) and enable Secure Domains that are secured with SSL (so https://m.example.com does not give security warnings) by following our instructions on production domains.