indian-curry / indian-curry.github.io

Web site for indian curry
http://indian-curry.github.io
BSD 3-Clause "New" or "Revised" License
4 stars 5 forks source link

Auto deploy from Travis. #8

Open piyush-kurur opened 8 years ago

piyush-kurur commented 8 years ago

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 commented 8 years ago

@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 commented 8 years ago

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

piyush-kurur commented 8 years ago

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 commented 8 years ago

I think it's whitelisted: https://github.com/travis-ci/apt-source-whitelist/pull/7 ?

piyush-kurur commented 8 years ago

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

I think it's whitelisted: https://github.com/travis-ci/apt-source-whitelist/pull/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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 7 years ago

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.