-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update readme to match current state
- Loading branch information
Showing
1 changed file
with
21 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
<!-- | ||
Copyright 2023 Andrew Chen Wang | ||
Copyright 2023 Jacob Hummer | ||
SPDX-License-Identifier: Apache-2.0 | ||
--> | ||
|
||
|
@@ -21,31 +22,24 @@ Add a GitHub Actions workflow file to your `.github/workflows/` folder similar | |
to the example shown below. | ||
|
||
```yml | ||
name: Wiki | ||
name: Publish wiki | ||
on: | ||
push: | ||
branches: [main] | ||
paths: [wiki/**, .github/workflows/wiki.yml] | ||
paths: | ||
- wiki/** | ||
- .github/workflows/publish-wiki.yml | ||
concurrency: | ||
group: wiki | ||
group: publish-wiki | ||
cancel-in-progress: true | ||
permissions: | ||
contents: write | ||
jobs: | ||
wiki: | ||
publish-wiki: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: Andrew-Chen-Wang/github-wiki-action@v3 | ||
# ⚠️ We use the env: key to provide our inputs! See #27. | ||
env: | ||
# Make sure this has a slash at the end! We use wiki/ by default. | ||
WIKI_DIR: my-octocat-wiki/ | ||
# You MUST manually pass in the GitHub token. | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# These are currently REQUIRED options | ||
GH_MAIL: [email protected] | ||
GH_NAME: actions[bot] | ||
- uses: Andrew-Chen-Wang/github-wiki-action@v4 | ||
``` | ||
<img align="right" alt="Screenshot of 'Create the first page' button" src="https://i.imgur.com/ABKIS4h.png" /> | ||
|
@@ -82,32 +76,23 @@ workflow `.yml` file) you'll always need to use a GitHub PAT. | |
|
||
### Options | ||
|
||
⚠️ This action uses `env:` to supply these options, not `with:`! | ||
- **`repository`:** The repository housing the wiki. Use this if you're | ||
publishing to a wiki that's not the current repository. You can change the | ||
GitHub server with the `github-server-url` input. Default is | ||
`${{ github.repository }}`. | ||
|
||
- **`GH_TOKEN`:** The GitHub API token to use. This is usually | ||
`${{ secrets.GITHUB_TOKEN }}` or `${{ github.token }}` (they are the same). | ||
This is **required**. | ||
- **`token`:** `${{ github.token }}` is the default. This token is used when | ||
cloning and pushing wiki changes. | ||
|
||
- **`GH_MAIL`:** You must specify an email address to be associated with the | ||
commit that we make to the wiki. This is **required**. | ||
- **`path`:** The directory to use for your wiki contents. Default `wiki/`. | ||
|
||
- **`GH_NAME`:** In addition to an email, you must also specify a username to | ||
tie to the commit that we make. This is **required**. | ||
- **`commit-message`:** The message to use when committing new content. Default | ||
is `Update wiki ${{ github.sha }}`. You probably don't need to change this, | ||
since this only applies if you look really closely in your wiki. | ||
|
||
- **`WIKI_DIR`:** This is the directory to process and publish to the wiki. | ||
Usually it's something like `wiki/` or `docs/`. The default is `wiki/`. | ||
|
||
- **`EXCLUDED_FILES`:** The files or directories you want to exclude. This _can_ | ||
be a glob pattern. By default, we include everything. | ||
|
||
- **`REPO`:** The repository to push to. This is useful if you want to push to a | ||
different repository than the one that houses the workflow file. This should | ||
be in the format `owner/repo`. The default is `${{ github.repository }}` (the | ||
current repo). | ||
|
||
- **`WIKI_PUSH_MESSAGE`:** The commit message to use when pushing to the wiki. | ||
This is useful if you want to customize the commit message. The default is the | ||
latest commit message from the main Git repo. | ||
- **`ignore`:** A multiline list of files that should be ignored when committing | ||
and pushing to the remote wiki. Each line is a pattern like `.gitignore`. Make | ||
sure these paths are relative to the path option! The default is none. | ||
|
||
<!-- prettier-ignore-start --> | ||
[github.com/settings/personal-access-tokens]: https://github.com/settings/personal-access-tokens | ||
|