Deploying your theme
To deploy your
Theme to Rusic you’ll need the following things:
- An API key to allow you to deploy your code to Rusic
- ID of the
Themeyou wish to deploy to
rusicgem which will help you actually send your code to Rusic
- And an
.rusic.ymlfile in the root of your theme to specify where you want to deploy to
Getting your API key and theme ID
You can find your API key by logging into your Rusic account and going to the “API Access” section under “Manage community”.
Pro tip: You can find your API key here.
Next, you’ll need your theme’s ID. From the Themes page click “Edit” on the theme you want to deploy to and you should see it’s ID in the URL.
rusic gem is a command line utility that will send your code to Rusic itself.
Pro tip: You can find out more about the
To install the gem, run the following command in your CLI of choice.
gem install rusic
You can check if everything worked correctly by running:
Setup your deployment
rusic gem is now almost ready to deploy your theme to Rusic. But it currently has no idea where your files want to go. This is where the
.rusic.yml file comes in handy.
Pro tip: If you used the
yogenerator to scaffold your theme you should already have one of these.
In the root of your project, create
.rusic.yml. In here we’ll specify a theme to deploy.
production: api_key: <your-api-key> theme: <your-theme-id>
Now you can run the following command to deploy your theme!
rusic deploy production
You can also add multiple environments if you wanted to have a staging and production space for example (these can also be named however you like).
production: api_key: <your-api-key> theme: <your-theme-id> staging: api_key: <your-api-key> theme: <your-theme-id>
Now you’ve got your theme deployed for the first time you probably want to start adding to it. You can do this easily by getting the
rusic gem to continuously deploy to your theme on Rusic.
The following command will watch for any changes in your theme’s files that need to be deployed and upload them for you as soon as you hit save in your editor.
rusic deploy production --watch