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

DOCUMENTER_KEY in github actions #1165

Closed
wants to merge 2 commits into from
Closed

Conversation

Wikunia
Copy link

@Wikunia Wikunia commented Oct 21, 2019

I think it should be DOCUMENTER_KEY instead of GITHUB_TOKEN but maybe I'm wrong then this PR is more like a question :)

@fredrikekre
Copy link
Member

It is correct, with GitHub Actions we can use the GitHub provided token and there is no need to add an ssh key, see #1161

@Wikunia
Copy link
Author

Wikunia commented Oct 22, 2019

Thanks for your reply. What is the GitHub provided token and we also don't need a Documenter key? If that is the case it should be mentioned when generating it.
Additionally n the logs with: Why there was no deployment the key is still mentioned as well as things like TRAVIS_BRANCH which is confusing if they're is no Travis involved in the process.

@fredrikekre
Copy link
Member

What is the GitHub provided token and we also don't need a Documenter key?

See https://help.github.com/en/github/automating-your-workflow-with-github-actions/virtual-environments-for-github-actions#github_token-secret

Additionally n the logs with: Why there was no deployment the key is still mentioned as well as things like TRAVIS_BRANCH which is confusing if they're is no Travis involved in the process.

What do you mean?

@Wikunia
Copy link
Author

Wikunia commented Oct 22, 2019

If I run:

DocumenterTools.genkeys(user="Wikunia", repo="[email protected]:Wikunia/ConstraintSolver.jl.git")

I get

[ Info: add a secure environment variable named 'DOCUMENTER_KEY' to https://travis-ci.com/Wikunia/[email protected]:Wikunia/ConstraintSolver.jl.git/settings (if you deploy using Travis CI) or https://github.com/Wikunia/[email protected]:Wikunia/ConstraintSolver.jl.git/settings/secrets (if you deploy using GitHub Actions) with value:

which looks like I also need a DOCUMENTER_KEY for Github Actions.

Additionally n the logs with: Why there was no deployment the key is still mentioned as well as things like TRAVIS_BRANCH which is confusing if they're is no Travis involved in the process.

What do you mean?

In GitHub Actions I get:

┌ Info: Deployment criteria:
│ - ✔ ENV["TRAVIS_REPO_SLUG"]="" occurs in repo="github.com/Wikunia/ConstraintSolver.jl.git"
│ - ✘ ENV["TRAVIS_PULL_REQUEST"]="" is "false"
│ - ✔ ENV["TRAVIS_TAG"]="" is (i) empty or (ii) a valid VersionNumber
│ - ✘ ENV["TRAVIS_BRANCH"]="" matches devbranch="master" (if tag is empty)
│ - ✔ ENV["DOCUMENTER_KEY"] exists
│ - ✔ ENV["TRAVIS_EVENT_TYPE"]="" is not "cron"
└ Deploying: ✘

Which looks like I need a DOCUMENTER_KEY that's why I changed it and the mentioning of Travis is a bit confusing as I do everything with GitHub Actions now.

@fredrikekre
Copy link
Member

You need to be on Documenter master branch for GitHub Actions support.

@Wikunia
Copy link
Author

Wikunia commented Oct 22, 2019

Yes I just found it confusing that Travis is mentioned there at all. Anyway thanks.

@fredrikekre
Copy link
Member

@Wikunia
Copy link
Author

Wikunia commented Oct 22, 2019

Sorry for bothering you again. I misread the master branch. Thought you meant the master branch of my repo.

What I did now is updating Documenter to v0.24.0-DEV which is mentioned in the Manifest.toml. That one was in .gitignore first but is now pushed to GitHub.

Locally I can run the commands mentioned in the workflows/docs.yml and it works without mentioning travis. It does mention travis if I do cd docs; julia make.jl instead of
julia --project=docs/ docs/make.jl though.

On GitHub I now run into this issue:

ERROR: path /home/runner/.julia/packages/Documenter/pCD13 for package Documenter no longer exists. Remove the package or `develop` it at a new path

probably because I changed the Documenter version. Does GitHub actions cache something to make it not working?

My files are in:
https://github.com/Wikunia/ConstraintSolver.jl/tree/feature-docs-2

Do you have an idea or where I might be able to ask? Thanks in advance.

@Wikunia
Copy link
Author

Wikunia commented Oct 22, 2019

Seems like I have to remove the old version of Documenter inside GitHub actions.
Then everything looks fine now. Thanks!

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.

2 participants