-
-
Notifications
You must be signed in to change notification settings - Fork 293
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
Update repo wiki page based on docs #3069
base: main
Are you sure you want to change the base?
Conversation
.github/workflows/wiki.yml
Outdated
USER_TOKEN: <USER_TOKEN_ENV_VARIABLE> # This is the repository secret | ||
USER_NAME: <USER_NAME> # Enter the username of your (bot) account | ||
USER_EMAIL: <USER_EMAIL> # Enter the e-mail of your (bot) account |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these need to be filled out with anything?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes they do, for the CI to run, there needs to be the environment variable for the user token secret, kind of like secrets.GITHUB_TOKEN
that you have in release.yml
workflow.
for the name and email, those are for the commits, so we can see in the wiki where the updates come from. It usually shows as "revisions".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for getting to this so late. So I need to change those myself? Or can you do it in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really know which secret to use to access the wiki, so what I did for now is I changed them to these
env:
USER_TOKEN: ${{ secrets.WIKI_TOKEN }}
USER_NAME: github-actions[bot]
USER_EMAIL: github-actions[bot]@users.noreply.github.com
I cannot really use the same GITHUB_TOKEN
you use in the other workflows because the wiki is technically a different repository, so the secret for this repository won't work for it as far as I know, so I just put a WIKI_TOKEN
.
Now what you need to do for this to work (hopefully if I didn't miss anything):
- Go to GitHub Settings → Developer Settings → Personal Access Tokens
- Generate a new token with wiki permissions
- Add it to your repository's secrets as
WIKI_TOKEN
I tested this on my own fork. Whenever files in docs are changed and pushed to the desired branch (currently set to
main
), the content ofdocs/*
get all pushed to the repo's wiki. Making the wiki page update correctly.For this to work :
1- The wiki page must be enabled, by creating a first page (
Home.md
page).2- Fill in the placeholders for user info and token in
wiki.yml
for the CI to work properly.With this we can have a more readable docs in the wiki page of the repo, this can be linked from the website too until we support converting this markdown pages to static pages.