-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #132: option added to push documentation to GH-PAGES #133
Conversation
@pri22296 @imujjwal96 please check the implementation. |
@Sch00lb0y please fix codacy issues |
ghdeploy.sh
Outdated
@@ -0,0 +1,45 @@ | |||
#!/bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of creating this script, use the existing publish_docs.sh
otherwise it would again lead to situations like #108 . ensure that the script is usable from both a webUI and travis. use idea similar to generate.sh
to run conditional code based on whether running from a webUI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have made changes
@Sch00lb0y Can we see a deployment for this? |
7aabe3b
to
0fa8d45
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also why does this require permission to delete my repository?
publish_docs.sh
Outdated
echo -e "DOCURL not set. Using default github pages URL" | ||
else | ||
echo $DOCURL > CNAME | ||
if ![ "${WEBUI:-false}" == "true" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why was this change made?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now WebUI don't have CNAME. I'll remove the condition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah but users can still specify the docurl in the .yaydoc.yml file.
backend/generator.js
Outdated
var donePercent = 0; | ||
var projectName = data.gitURL.split("/")[4].split(".")[0]; | ||
var gitURL = "http://" + data.username+":" + crypter.decrypt(data.encryptedToken) + "@github.com/" + data.username + "/" + projectName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of building the url here, you could have passed the token as OAUTH_TOKEN and the publish script should have handled that.
@pri22296 for pushing repo have to get the access.even in open-event-webapp if users want to push, they requesting delete level access |
@Sch00lb0y If that's the case, then let it be |
backend/generator.js
Outdated
@@ -1,15 +1,13 @@ | |||
var exports = module.exports = {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did you remove this?
backend/generator.js
Outdated
}; | ||
|
||
exports.deployPages = function (socket, data) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generator.js
is the backend script for documentation generation. Move this function to a separate file.
public/scripts/form.js
Outdated
@@ -44,6 +44,7 @@ $(function () { | |||
$('#notification-container').css("visibility", "hidden"); | |||
$('#notification-container').css("opacity", "0"); | |||
}, 5000) | |||
$("#buttons > .row").append('<a href="/github?email='+data.email+'&uniqueId='+data.uniqueId+'&gitURL='+data.gitUrl+'" class="btn btn-default" id="btnDeploy">deploy</a>') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please follow the same pattern as above
The link is not working |
92d77b3
to
d899dc5
Compare
@pri22296 @imujjwal96 I have made changes. here is the new link http://yaydoc.pagupu.in please check |
@imujjwal96 I have fixed please check now |
@imujjwal96 i have updated the permission scope |
views/index.jade
Outdated
@@ -35,6 +35,7 @@ block content | |||
.row | |||
a.btn.btn-default(type='button' id='btnDownload') Download | |||
a.btn.btn-default(type='button' id='btnPreview' target='_blank') Preview | |||
a.btn.btn-default(type='button' id='btnDeploy') deploy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deploy :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Nice job @Sch00lb0y
@Sch00lb0y any specific reason for not reusing the existing console for ghpages deploy? |
@pri22296 If we keep on adding things to one page. it'll be hard to maintain and also I'm templating the deploy page according to the need. In |
Description
option added to push documentation to GH-PAGES
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist:
Fixes #<number> commit message