Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Automatic examples updating #37

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/update_readme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Update README

on:
push:
branches:
- master
paths:
- 'examples/**'

jobs:
embed-code:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Markdown autodocs
uses: dineshsonachalam/markdown-autodocs@v1.0.4
with:
commit_message: 'docs: update code examples'
# Optional output file paths, defaults to '[./README.md]'.
output_file_paths: '[./README.md]'
categories: '[code-block]'
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ The Neovim package specification supports a single, top-level package metadata f
* `summary` (String) a short description of the package, typically less than 100 character long.
* `detailed` (String) a long-form description of the package, this should convey the package's principal functionality to the user without being as detailed as the package readme.
* `homepage` (String) This is the homepage of the package, which in most cases will be the GitHub URL.
* `author` (Table) information about the author of the package.
* `name`: author name if there are multiple one can use e. 'plugin team'
* `email`: author email
* `license` (String) This is [SPDX](https://spdx.org/licenses/) license identifier. Dual licensing is indicated via joining the relevant licenses via `/`.

* `dependencies` (List[Table]) A list of tables describing the package dependencies. Each entry in the table has the following, only `source` is mandatory:
Expand All @@ -54,6 +57,7 @@ The Neovim package specification supports a single, top-level package metadata f

# Example

<!-- MARKDOWN-AUTO-DOCS:START (CODE:src=/examples/packspec.1.lua) -->
```lua
package = "lspconfig"
version = "0.1.2"
Expand Down Expand Up @@ -83,8 +87,10 @@ external_dependencies = {
},
}
```
<!-- MARKDOWN-AUTO-DOCS:END -->

And in json format
<!-- MARKDOWN-AUTO-DOCS:START (CODE:src=/examples/packspec.1.json) -->
```json
{
"package" : "lspconfig",
Expand Down Expand Up @@ -114,6 +120,7 @@ And in json format
}
}
```
<!-- MARKDOWN-AUTO-DOCS:END -->

# Guidelines for `packspec` implementers

Expand Down