Skip to content
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

Auto deploy from Travis. #8

Open
piyush-kurur opened this issue Sep 5, 2016 · 10 comments
Open

Auto deploy from Travis. #8

piyush-kurur opened this issue Sep 5, 2016 · 10 comments

Comments

@piyush-kurur
Copy link
Member

Currently, I need to do a deploy myself. It would be good if travis can be setup to auto-deploy. I am not sure whether it is possible through some webhooks.

@piyush-kurur
Copy link
Member Author

@saurabhnanda @ajnsit @psibi. Is it possible to auto-deploy from travis directly. I have not done this but I guess this should be possible if we set up travis appropriately.

@piyush-kurur
Copy link
Member Author

https://gist.github.com/willprice/e07efd73fb7f13f917ea might be relevant investigate.

@piyush-kurur
Copy link
Member Author

First we need to move to a stack based build. The ppa for stack is not yet white listed. So we wait for that to happend before attempting this issue.

@psibi
Copy link
Member

psibi commented Sep 10, 2016

I think it's whitelisted: travis-ci/apt-source-safelist#7 ?

@piyush-kurur
Copy link
Member Author

On Fri, Sep 09, 2016 at 10:30:47PM -0700, Sibi wrote:

I think it's whitelisted: travis-ci/apt-source-safelist#7 ?

Great. Can you get this issue fixed? The steps involved are

  1. move from cabal build to stack build: To improve speed you can
    • cache .stack-work or ~/.stack or any such relevant directory.
    • pre-install the right ghc version from hvr (I think that is already done).
  2. In the after success field, put in a stack exec website deploy
    (with necessary modification to use the security token based push.

@piyush-kurur
Copy link
Member Author

May be you can start by just moving the build to stack. I am unsure about https://gist.github.com/willprice/e07efd73fb7f13f917ea. Will it deploy for travis builds from pull requests as well. That would be unacceptable (I do not see where it ensure that the pushes to the master repository will only be deployed

@psibi
Copy link
Member

psibi commented Sep 10, 2016

Sure, I can look into it. But I don't think I have proper privilege access for this repository in Github and for changing the settings in Travis.

@piyush-kurur
Copy link
Member Author

I just made you an owner of this repo. But before you enable auto deploy make sure that deploys do not happen from pull requests.

@piyush-kurur
Copy link
Member Author

Also I recommend that you first push to your private branch and explicitly send a pull request. This way you are sure that the changes that you make are not breaking. When travis passed you can push onto develop on the main repo

@sakshamsharma
Copy link

sakshamsharma commented Feb 18, 2017

Here's the config I wrote for Hakyll, Stack and Travis:
https://github.com/sakshamsharma/acehack/blob/master/.travis.yml

Running a bit busy, but you can copy the code almost verbatim from here (along with one or two scripts in the parent folder).

You'll also have to create an encryption label for travis (that stores the private key which has Github push access for this particular project), and edit the encryption label in the .travis file I shared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants