Home

Awesome

<h1> <p align="center"> Wiki Page Creator GitHub Action </p> </h1> <p align="center"> This repository provides a GitHub action to <strong>publish Wiki pages <i>with a provided markdown</i></strong> into the Wiki section of your GitHub repository. </p>

Table of Contents

Common usage

The action requires some content markdown/wiki pages that must be generated on a previous step, and located into a specific folder.
This action scans the folder, adds its files, and finally publishes them to the wiki.

Use GitHub action

Please note that this action requires your repo to already own at least one page in the wiki section: https://github.com/:yourOrganization/:yourRepository/wiki

Settings for v2.0.0+ release

- name: Upload Release Notes to Wiki
  uses: docker://decathlon/wiki-page-creator-action:latest
  env:
    GH_PAT: ${{ secrets.GH_PAT }}
    ACTION_MAIL: youremail@mail.com
    ACTION_NAME: yourusername
    OWNER: yourGitHubOrganisation
    REPO_NAME: yourGitHubRepository

Environment Variables options

To be able to push the new Wiki Page, the action requires some environment variables/secrets:

Full Example (with additional actions to generate content)

The following one is the workflow we are using to push the release notes to our project wikis.

In this example the workflow is started on milestone; the first action is filtering on the closed action of the milestone (if milestone is created, renamed, ... the other steps are skipped).

The create-release-notes-action creates the markdown file (check here if your need more information). The output file is stored into the temp_release_notes.

The wiki-page-creator-action takes all the markdown files from the temp_release_notes folder (skipping a README.md file if found) and uploads them to the provided wiki repo.

Using v2.0.0+

on: 
  milestone:
    types: [closed]
name: Milestone Closure
jobs:
  release-notes:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: Create Release Notes
      uses: docker://decathlon/release-notes-generator-action:2.0.0
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        OUTPUT_FOLDER: temp_release_notes
        USE_MILESTONE_TITLE: "true"
    - name: Upload Release Notes to Wiki
      uses: docker://decathlon/wiki-page-creator-action:latest
      env:
        ACTION_MAIL: myuser@users.noreply.github.com
        ACTION_NAME: myPushingUser
        GH_PAT: ${{ secrets.GH_PAT }}
        MD_FOLDER: temp_release_notes
        OWNER: yourGitHubOrganisation
        REPO_NAME: yourGitHubRepository
        SKIP_MD: README.md

Credits

The code of this actions began on mmornati GitHub workspace.