Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/SwiftDocOrg/github-wiki-publish-action
GitHub Action that publishes the contents of a directory to your project's wiki
https://github.com/SwiftDocOrg/github-wiki-publish-action
github-actions github-wiki
Last synced: 24 days ago
JSON representation
GitHub Action that publishes the contents of a directory to your project's wiki
- Host: GitHub
- URL: https://github.com/SwiftDocOrg/github-wiki-publish-action
- Owner: SwiftDocOrg
- License: mit
- Archived: true
- Created: 2020-01-19T21:16:42.000Z (almost 5 years ago)
- Default Branch: v1
- Last Pushed: 2021-04-19T12:22:09.000Z (over 3 years ago)
- Last Synced: 2024-10-14T20:01:51.044Z (2 months ago)
- Topics: github-actions, github-wiki
- Language: Shell
- Homepage:
- Size: 17.6 KB
- Stars: 82
- Watchers: 2
- Forks: 38
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Github Wiki Publish Action
This [GitHub Action][github actions]
publishes the contents of a directory to your project's [wiki][github wiki]
from a workflow.## Usage
In a new or existing workflow,
add a step using `SwiftDocOrg/github-wiki-publish-action@v1`
with a path to a directory containing the documentation you wish to upload.```yml
name: Documentationon: [push]
jobs:
build:
runs-on: ubuntu-lateststeps:
- uses: actions/checkout@v1
# Additional steps to generate documentation in "Documentation" directory
- name: Upload Documentation to Wiki
uses: SwiftDocOrg/github-wiki-publish-action@v1
with:
path: "Documentation"
env:
GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
```### Supported Products
- [x] GitHub.com
- [x] GitHub Enterprise Cloud
- [x] GitHub Enterprise Server
- [x] GitHub AE## Setup
This GitHub action requires that your repository has the following:
- A wiki with at least one page in it
- A secret named `GH_PERSONAL_ACCESS_TOKEN`
with a Github personal access token with "repo" authorizationFollow 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.![GitHub Wikis Feature](https://user-images.githubusercontent.com/7659/72726104-5f3aff80-3b3c-11ea-8f2e-fe73aff0276b.png)
### 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.![GitHub Wiki Create First Page](https://user-images.githubusercontent.com/7659/72726186-927d8e80-3b3c-11ea-8014-4622f8ff3226.png)
### 3. Generate a Personal Access Token
Navigate to the [Personal access tokens](https://github.com/settings/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.![GitHub Personal Access Token Select Scopes](https://user-images.githubusercontent.com/7659/72726210-9f9a7d80-3b3c-11ea-81b4-528de92fb9fa.png)
> **Note**:
> GitHub actions have access to [a `GITHUB_TOKEN` secret][GITHUB_TOKEN],
> but that token's permissions are limited to
> the repository that contains your workflow.
> This workflow requires the generation of a new personal access 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 `GH_PERSONAL_ACCESS_TOKEN` into the "Name" field and
pasting your token into the "Value" field.## License
MIT
## Contact
Mattt ([@mattt](https://twitter.com/mattt))
[github actions]: https://help.github.com/en/actions
[github wiki]: https://help.github.com/en/github/building-a-strong-community/about-wikis
[GITHUB_TOKEN]: https://help.github.com/en/actions/automating-your-workflow-with-github-actions/authenticating-with-the-github_token#about-the-github_token-secret