From 4f207299a0e5b2ca8588a191a98511c5d7067ace Mon Sep 17 00:00:00 2001 From: Jacob Hummer Date: Tue, 16 May 2023 17:09:19 -0500 Subject: [PATCH] update readme to match current state --- README.md | 57 ++++++++++++++++++++----------------------------------- 1 file changed, 21 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index c38f1b1..0f9c7e2 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ @@ -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: actions@users.noreply.github.com - GH_NAME: actions[bot] + - uses: Andrew-Chen-Wang/github-wiki-action@v4 ``` Screenshot of 'Create the first page' button @@ -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. [github.com/settings/personal-access-tokens]: https://github.com/settings/personal-access-tokens