Installing a Theme programatically

If you want to install themes via your app.yml, use the following format:

run:
  - exec: echo "Beginning of custom commands"

  - file:
      path: /tmp/mythemes.yml
      contents: |
        discourse-gifs:
          url: https://github.com/discourse/discourse-gifs.git
          add_to_all_themes: true

  - exec:
      cd: $home
      cmd: su discourse -c 'bundle exec rake themes:install < /tmp/mythemes.yml'

  - exec: echo "End of custom commands"
7 Likes