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"
YAML format options
The YAML file supports a short format (URL only) and a long format with additional options:
# Short format - just the URL
theme_name: https://github.com/example/theme.git
# Long format - with options
theme_name:
url: https://github.com/example/theme_name.git
branch: "main"
private_key: ""
default: false
add_to_all_themes: false
skip_update: false
| Option | Description |
|---|---|
url |
(required) The git repository URL |
branch |
Git branch to use (defaults to the repo’s default branch) |
private_key |
SSH private key for private repositories |
default |
Set as the default theme (boolean) |
add_to_all_themes |
For components only — install on every theme (boolean) |
skip_update |
Skip updating if the theme is already installed (boolean) |
Installing from an archive
You can also install a theme from a local .zip or .tar.gz archive:
THEME_ARCHIVE=/path/to/theme.zip bundle exec rake themes:install:archive
Set UPDATE_COMPONENTS=0 to skip updating included components.
Last edited by @JammyDodger 2024-05-25T11:03:53Z
Check document
Perform check on document: