-
Notifications
You must be signed in to change notification settings - Fork 772
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
Sync changes from master to gh-pages on each merge request #500
Conversation
Up for review now!
|
8df739d
to
468760f
Compare
ping @containscafeine @kadel and whoever-else-wants-to-do-a-quick-review I tested this at https://github.com/cdrage/kompose/ and it seems to work. Only way to test this on the Kompose repo is to have it merged in and then merge a change to a doc. This only runs the doc sync on 1.6 of Go (so it only runs once!) |
.travis.yml
Outdated
@@ -29,3 +32,5 @@ after_success: | |||
# gover collects all .coverprofile files and saves it to one file gover.coverprofile | |||
- gover | |||
- goveralls -coverprofile=gover.coverprofile -service=travis-ci | |||
# sync the docs only if everything else was successful | |||
- cd script && ./sync-docs.sh |
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.
nit:
How about -
script/sync-docs.sh
in place of cd script && ./sync-docs.sh
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 guess that this is because of path DOCS_KEY
.
I agree with @containscafeine it is not nice to do cd ;-)
How about changing DOCS_KEY
to script/deploy_key
and run it like script/sync-docs.sh
?
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.
@containscafeine @kadel
Only reason why I do this is to make sure that the cd kompose
and cd ..
work correctly so there is absolutely no way to accident push to master by accident or mess with the root directory!
But I can change it so we can simply do ./sync-docs
. Its much cleaner!
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.
if you think it will be safer like this, than i'm ok with it.
Maybe just one thing to consider: If another command is added to list after cd script && ./sync-docs.sh
what is its cwd going to be? ./script/
or it will remain as before?
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.
@kadel
I updated it to do just ./script/sync-docs.sh
way better now!
5d08e6e
to
513f802
Compare
Note: I'm avoiding using: https://docs.travis-ci.com/user/deployment/pages/ since it won't sync between the master branch and gh-pages. Also, since it's unable to run pre_run and post_run scripts (so we can update the docs!) |
Had some issues with replication / travis that may help for review: To replicate: (following: gist.github.com/domenic/ec8b0fc8ab45f39403dd) !!! Edit
|
@kadel @containscafeine I can confirm that it works at https://github.com/cdrage/kompose/tree/gh-pages I don't think there's any harm to merge this in and test it with a documentation update! Should we try it? |
What key are you using? |
Yes, it's a new SSH key that's been generated that's tied to my personal account. We could use this key temporarily untill... We create a secondary user / "bot" and use it for SSH, although we would have to go through the process of getting it into kubernetes-incubator / invited by an administrator. |
This is something that I'm a little bit afraid of. That ssh key will have access to all your repositories. But it is your user account so if you are OK with it .... 😉 It looks like we can add new users to Kompose repo without adding them to kubernetes-incubator group. |
I've gone ahead and created @komposebot I've also updated the deploy_key as well as the bash values. :) So it's all good-to-go now! |
This adds the functionality for Travis to sync with http://kompose.io in regards to "syncing" the docs directory in master and the docs within gh-pages. Two things are added: script/sync-docs/sh script/deploy_key.enc The encrypted key follows the conventions here: https://gist.github.com/domenic/ec8b0fc8ab45f39403dd and the functionality of running: `travis encrypt-file encrypt_key` The script is ran each-time a PR is merged (and only if it's sucessful!) as per the modifications in `.travis.yml`. Thus each time we make a change in master, there's no need to open up another PR for syncing the changes with `gh-pages`.
lets test it than ;-) |
This adds the functionality for Travis to sync with http://kompose.io in
regards to "syncing" the docs directory in master and the docs within
gh-pages.
Two things are added:
script/sync-docs/sh
script/deploy_key.enc
The encrypted key follows the conventions here:
https://gist.github.com/domenic/ec8b0fc8ab45f39403dd
and the functionality of running:
travis encrypt-file encrypt_key
The script is ran each-time a PR is merged (and only if it's
sucessful!) as per the modifications in
.travis.yml
.Thus each time we make a change in master, there's no need to open up
another PR for syncing the changes with
gh-pages
.