GitHub Action
Markdown action: create indexes
v5.0.2
Latest version
This Github action creates markdown index pages for your project, the changes still need to be submitted afterward.
It creates a list of each markdown file in the folders and displays it under documents. For each subfolder that has documentation, then that folder is displayed in categories.
Parameters | Optional | Description |
---|---|---|
folder |
✅ | The folder path to start at, default uses ${{github.workspace}} |
filename |
✅ | The filename of the generated file. default to index |
content-file |
✅ | The filepath (relative to where the README.md or index.md) where content will be read from and input into index file, default to .content.md |
include |
✅ | The files to additionaly include in the index file, follows glob pattern on the filenames, supports multiple patterns via multi-line string` |
exclude |
✅ | The files to exclude from the index file, follows glob pattern on the filenames, supports multiple patterns via multi-line string |
# This is a basic workflow to help you get started with Actions
name: Create markdown indexes
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v3
# Runs a single command using the runners shell
- name: Generated Markdown Readmes
uses: DaanV2/[email protected]
- name: Commit changes
continue-on-error: true
run: |
cd ${{github.workspace}}
git config --global user.email "[email protected]"
git config --global user.name "DaanV2 Bot"
git add .
git commit -m "auto: Generated markdown indexes"
git push
With options
- name: Generated Markdown Readmes
uses: DaanV2/[email protected]
with:
folder: ${{github.workspace}}
filename: README.md
include: |
*.pdf
*.mobi
*.epub
*.zip