Skip to content
This repository was archived by the owner on Nov 4, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 2 additions & 65 deletions config/addon-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,69 +4,6 @@
const AddonDocsConfig = require('ember-cli-addon-docs/lib/config');

module.exports = class extends AddonDocsConfig {
/*
Return a boolean indicating whether or not the current deploy should
actually run. The `info` parameter contains details about the most recent
git commit. Note that you can also access any configured environment
variables via `process.ENV`.

info.branch => the current branch or `null` if not on a branch
info.sha => the current sha
info.abbreviatedSha => the first 10 chars of the current sha
info.tag => the tag for the current sha or `null` if none exists
info.committer => the committer for the current sha
info.committerDate => the commit date for the current sha
info.author => the author for the current sha
info.authorDate => the authored date for the current sha
info.commitMessage => the commit message for the current sha

Note that CI providers typically check out a specific commit hash rather
than a named branch, so `info.branch` may not be available in CI builds.
*/
shouldDeploy(info) {
/*
For example, you might configure your CI builds to execute `ember deploy`
at the end of each successful run, but you may only want to actually
deploy builds on the `master` branch with the default ember-try scenario.
To accomplish that on Travis, you could write:

return process.env.TRAVIS_BRANCH === 'master'
&& process.env.EMBER_TRY_SCENARIO == 'ember-default';
*/
return super.shouldDeploy(info);
}

/*
Return a string indicating a subdirectory in the gh-pages branch you want
to deploy to, or nothing to deploy to the root. This hook receives the same
info object as `shouldDeploy` above.
*/
deployDirectory(info) {
/*
For example, to deploy a permalink-able copy of your docs site any time
you tag a release, you could write:

return info.tag ? `tags/${info.tag}` : 'master';
*/
return super.deployDirectory(info);
}

/*
By default, the folder returned by `deployDirectory()` above will be
emptied out before a new revision of the docs application is written there.

To retain certain files across deploys, return an array of file paths or
globs, relative to the deploy directory, indicating files/directories that
should not be removed before deploying.
*/
preservedPaths(info) {
/*
For example, if you had static JSON in your gh-pages branch powering
something like a blog UI that you want to manage separately from your
app deploys, you might write:

return ['blog-posts/*.json', ...super.preservedPaths(info)];
*/
return super.preservedPaths(info);
}
// See https://ember-learn.github.io/ember-cli-addon-docs/latest/docs/deploying
// for details on configuration you can override here.
};
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@
"broccoli-asset-rev": "^2.4.5",
"ember-ajax": "^3.0.0",
"ember-cli": "~3.0.0",
"ember-cli-addon-docs": "^0.1.4",
"ember-cli-addon-docs": "^0.2.2",
"ember-cli-addon-docs-yuidoc": "^0.1.1",
"ember-cli-dependency-checker": "^2.0.0",
"ember-cli-deploy": "^1.0.2",
"ember-cli-deploy-build": "^1.1.1",
"ember-cli-deploy-git": "^1.3.1",
"ember-cli-deploy-git": "^1.3.2",
"ember-cli-deploy-git-ci": "^1.0.1",
"ember-cli-eslint": "4",
"ember-cli-favicon": "^1.0.0-beta.4",
Expand Down
3 changes: 2 additions & 1 deletion tests/dummy/config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = function(environment) {
let ENV = {
modulePrefix: 'dummy',
environment,
rootURL: '',
rootURL: '/',
locationType: 'auto',
EmberENV: {
FEATURES: {
Expand Down Expand Up @@ -47,6 +47,7 @@ module.exports = function(environment) {
}

if (environment === 'production') {
// Allow ember-cli-addon-docs to update the rootURL in compiled assets
ENV.rootURL = '/ember-medium-editor';
// here you can enable a production-specific feature
}
Expand Down
Loading