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

Document GITHUB_TOKEN workaround #1239

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 11 additions & 13 deletions docs/src/man/hosting.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ The three lines in the `script:` section do the following:
Travis CI used to use `matrix:` as the section to configure to build matrix in the config
file. This now appears to be a deprecated alias for `jobs:`. If you use both `matrix:` and
`jobs:` in your configuration, `matrix:` overrides the settings under `jobs:`.

If your `.travis.yml` file still uses `matrix:`, it should be replaced with a a single
`jobs:` section.

Expand Down Expand Up @@ -216,9 +216,13 @@ see the previous section.

### Authentication: `GITHUB_TOKEN`

When running from GitHub Actions it is possible to authenticate using
[the GitHub Actions authentication token
(`GITHUB_TOKEN`)](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/authenticating-with-the-github_token). This is done by adding
When running from GitHub Actions it is possible to authenticate using a personal
access token.

First, create a new personal access token named "GITHUB_TOKEN" with
the "repo" scope checked [here](https://github.com/settings/tokens/new).

Then, add

```yaml
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -227,15 +231,9 @@ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
to the configuration file, as showed in the [previous section](@ref GitHub-Actions).

!!! note
You can only use `GITHUB_TOKEN` for authentication if the target repository
of the deployment is the same as the current repository. In order to push
elsewhere you should instead use a SSH deploy key.

!!! warning "GitHub Pages and GitHub Token"
Currently the GitHub Page build is not triggered when the GitHub provided
`GITHUB_TOKEN` is used for authentication. See
[issue #1177](https://github.com/JuliaDocs/Documenter.jl/issues/1177)
for more information.
While GitHub will automatically create a github token for you named "GITHUB_TOKEN",
it will not have push access. Therefore, you must override
GitHub by making a new personal access token with the same name.
Copy link
Contributor

Choose a reason for hiding this comment

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

It should specifically say what to do.

Copy link
Author

Choose a reason for hiding this comment

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

I can add a note like (see instructions above) because I did add instructions to do this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, and a link to that part of the instructions


### Authentication: SSH Deploy Keys

Expand Down