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

configure circleci to auto deploy docs #115

Merged
merged 3 commits into from
Oct 14, 2018

Conversation

sappelhoff
Copy link
Member

closes #113

.circleci/config.yml Outdated Show resolved Hide resolved
rm -rf _build/doctrees _build/mne_bids.github.io
git clone -b gh-pages --single-branch --no-checkout --depth 1 https://github.com/mne-tools/mne-bids _build/mne_bids.github.io
touch _build/mne_bids.github.io/.nojekyll
make html
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just use make install?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes good point. I think this will fail anyways because no one will be there to type in a password?

@sappelhoff
Copy link
Member Author

okay, it is as I expected ... nobody is there to provide a password for pushing the docs to our gh-pages branch.

How to solve that @jasmainak ?

In the mne python link you provided they have some "pushd" command, what's that?

@@ -30,3 +30,11 @@ jobs:
- store_artifacts:
path: doc/_build/html/
destination: html
- deploy:
name: github pages deployment
command: |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should do it only for master branch with CIRCLE_BRANCH command. Then I think once I merge, it should work ... not sure but I think it should

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so reading up on this, CIRCLE_BRANCH is an environment variable pointing to the branch that is currently being built. I am not really sure what you mean by "I should use it" ... we still want to push the built docs against our gh-pages branch, don't we?

reference: https://circleci.com/docs/2.0/env-vars/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The deploy should be done only for master branch, not for the PR branches. And the pushing to gh-pages is taken care of by make install

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see ... okay - fingers crossed then ;-)

@codecov-io
Copy link

codecov-io commented Oct 14, 2018

Codecov Report

Merging #115 into master will decrease coverage by 0.41%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #115      +/-   ##
==========================================
- Coverage   93.56%   93.14%   -0.42%     
==========================================
  Files          14       14              
  Lines         839      846       +7     
==========================================
+ Hits          785      788       +3     
- Misses         54       58       +4
Impacted Files Coverage Δ
mne_bids/mne_bids.py 91.49% <0%> (-1.42%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a5d6890...6342b84. Read the comment docs.

@jasmainak jasmainak merged commit e88eb01 into mne-tools:master Oct 14, 2018
@jasmainak
Copy link
Member

Merged. Let's see if it works @sappelhoff

@sappelhoff sappelhoff deleted the deply_gh_pages_circleci branch October 14, 2018 19:24
@jasmainak
Copy link
Member

@sappelhoff see my cosmit to make it work here: b6d9721

@sappelhoff
Copy link
Member Author

sappelhoff commented Oct 15, 2018

nice, two questions so that I fully understand:

  1. Why do we configure the user to be Circle Ci (does circle@mne.com even exist?)
  2. Where did you get the ssh fingerprint from? ... and wouldn't now everyone that sees this fingerprint be able to push to our repo?
    @jasmainak

@jasmainak
Copy link
Member

I honestly don't know the answer to your first question. Maybe @larsoner knows

For the second question, I copied what sphinx-gallery is doing. The fingerprint is my user key generated by CircleCI. I don't think anyone can use it -- the fingerprint is probably used to identify which key to use out of the ones that I've added.

@jasmainak
Copy link
Member

Actually, I think for the first, it's just a config requirement by git. So, you can track that these commits were actually made by an automatic push from Circle

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

Successfully merging this pull request may close these issues.

automatically deploy the documentation
3 participants