Awesome
Github Wiki Publish Action
This GitHub Action publishes the contents of a directory to your project's wiki from a workflow.
Setup
This GitHub action requires that your repository has the following:
- A wiki with at least one page in it
- A secret named
GITHUB_PERSONAL_ACCESS_TOKEN
with a Github personal access token with "repo" authorization
Follow the steps below to ensure that everything's configured correctly.
Note GitHub doesn't currently provide APIs for interacting with project wikis, so much of the required setup must be done manually.
1. Enable Your Repository's Wikis Feature
Navigate to the "Settings" tab for your repository, scroll down to the "Features" section, and ensure that the checkbox labeled "Wikis" is checked.
2. Create the First Wiki Page
With the Wikis feature enabled for your repository, navigate to the "Wiki" tab. If prompted, create the first wiki page.
3. Generate a Personal Access Token
Navigate to the Personal access tokens page in your GitHub account settings (Settings > Developer settings > Personal access tokens) and click the "Generate a new token" button.
In the "New personal access token" form, provide a descriptive comment in the "Note" field, like "Wiki Management". Under "Select scopes", enable all of the entries under "repo" perms.
When you're done, click the "Generate token" button at the bottom of the form.
Note: GitHub actions have access to a
GITHUB_TOKEN
secret, but that token's permissions are limited to the repository that contains your workflow. This workflow requires the generation of a new personal acccess token to read and write to the git repository for your project's wiki.
4. Set a Repository Secret
Copy your generated personal access token to the clipboard
and navigate to your project settings.
Navigate to the "Secrets" page,
click "Add a new secret",
and fill in the form by
entering GITHUB_PERSONAL_ACCESS_TOKEN
into the "Name" field and
pasting your token into the "Value" field.
License
MIT
Contact
Mattt (@mattt)