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

Build and deploy dev/master documentation using GitHub Actions #4852

Merged
merged 23 commits into from
Aug 4, 2020

Conversation

emmanuelle
Copy link
Member

@emmanuelle emmanuelle commented Jul 17, 2020

Closes #4805.
Follow-up of #4843 but with a branch in the scikit-image repo so that we can test the workflow.

@emmanuelle
Copy link
Member Author

Argh the GH action keeps failing with "Error loading key "(stdin)": invalid format". I've been trying to add the private key in the sciki-image/scikit-image secrets with and without the "begin" and "end" lines, with a new line... Is this the same error which you were having @jvkersch or another one (in which case we would undoubtedly be making progress :-))?

@emmanuelle
Copy link
Member Author

Lo and behold, we've tested the github action with @jvkersch (with commit d172b74 which used this branch instead of master to see if the deploy worked), and it works (you can see in the online dev doc that the mitosis tutorial by @mkcor is online now)! For future reference, the authentication problems were due to the fact so that you need a specific formatting of RSA key which did not correspond to the default of ssh-keygen on my Ubuntu machine. The successful command to generate the key pair was

 ssh-keygen -m PEM -t rsa -b 4096 -C "your_email@example.com"

Note that this PR is using a branch pushed to the scikit-image repo, which we don't do usually, so we'll have to make sure to delete that branch.

@jvkersch could you please check that my last commit (switching back to master for the branch) is ok? And then @skimage/core is think this one is ready!

@jvkersch
Copy link
Contributor

@emmanuelle Looks good!

One suggestion, if you're up for it, is to rename the secrets.GH_TOKEN into something more descriptive like secrets.DEPLOY_KEY_PRIVATE. That would help future generations of developers with troubleshooting ;)

@emmanuelle
Copy link
Member Author

One suggestion, if you're up for it, is to rename the secrets.GH_TOKEN into something more descriptive like secrets.DEPLOY_KEY_PRIVATE. That would help future generations of developers with troubleshooting ;)

good idea :-). Done!

@alexdesiqueira alexdesiqueira added the 🤖 type: Infrastructure CI, packaging, tools and automation label Jul 25, 2020
@emmanuelle
Copy link
Member Author

@skimage/core anything else I should do before merging this one?

@sciunto
Copy link
Member

sciunto commented Jul 30, 2020

@scikit-image/core anything else I should do before merging this one? [former ping by @emmanuelle didn't work)

- name: Install Python
uses: actions/setup-python@v1
with:
python-version: 3.7
Copy link
Member

Choose a reason for hiding this comment

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

Just a question, what happens if python 3.7 is not shipped in ubuntu-lastest (which will be true a day or another)?

Copy link
Member

Choose a reason for hiding this comment

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

I just want to know which indicator we are supposed to monitor...

Copy link
Member Author

Choose a reason for hiding this comment

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

the build fails :-). And then we change the config. But it would stop early enough not to push a wrong version of the doc, if this is your concern.

eval "$(ssh-agent -s)"
ssh-add - <<< "${DEPLOY_KEY}"
git config --global user.email "travis@travis-ci.com"
git config --global user.name "Travis Bot"
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't be attributed to GH-action instead? (Or am I lost?)

Copy link
Member

Choose a reason for hiding this comment

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

I agree!

Copy link
Member Author

Choose a reason for hiding this comment

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

done!

python -m pip install -r requirements/docs.txt
- name: Install package
run: |
python setup.py install
Copy link
Member

Choose a reason for hiding this comment

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

Could we use python -m pip install . here? That will future-proof us for when we switch to pyproject.toml etc.

Copy link
Member Author

Choose a reason for hiding this comment

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

ok! done.

@jni
Copy link
Member

jni commented Jul 31, 2020

@emmanuelle this is so cool! Have you explored whether there is a way to make the docs visible on each PR, though?

@sciunto sciunto added this to the 0.18 milestone Jul 31, 2020
@emmanuelle
Copy link
Member Author

@emmanuelle this is so cool! Have you explored whether there is a way to make the docs visible on each PR, though?

Please see #4881 for this.

@emmanuelle
Copy link
Member Author

@sciunto @jni I made the requested changes, then I temporarily checked the action by having it run on this branch (it works, as you can see from https://github.com/scikit-image/docs/tree/gh-pages), and then I switched back to master in the last commit. I hope the PR is ready now! Don't worry about the CircleCI failure, the config file is in #4881

Copy link
Member

@sciunto sciunto left a comment

Choose a reason for hiding this comment

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

perfect!

@jni jni changed the title Dev/GitHub action doc build Build and deploy dev/master documentation using GitHub Actions Aug 4, 2020
@jni jni merged commit b94a4c0 into master Aug 4, 2020
@jni jni deleted the dev/github-action-doc-build branch August 4, 2020 05:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 type: Infrastructure CI, packaging, tools and automation 🏃 Sprint
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dev doc is not deployed when pre build is failing on Travis
5 participants