Skip to content

added preview window #22

added preview window

added preview window #22

Workflow file for this run

name: Documentation Generation
on:
push:
tags-ignore:
# ignore all tags
- '**'
branches:
# run for all branches
- '**'
jobs:
generate-docs:
runs-on: ubuntu-22.04
name: Generate Documentation
env:
TEMP_README: "__temp_readme.md"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
- name: Prepare markdown file
run: |
TEMP_CONFIG="$(mktemp)"
# Retrieve default config and put it in a temp file.
{
echo '```lua'
awk '/DOCGEN_END/{f=0} f; /DOCGEN_START/{f=1}' lua/projector/config.lua
echo '```'
} > "$TEMP_CONFIG"
# Insert the default config between DOCGEN_CONFIG tags in the README.
# And remove stuff between DOCGEN_IGNORE_START and DOCGEN_IGNORE_END tags from README.
{
sed -e '
/DOCGEN_CONFIG_START/,/DOCGEN_CONFIG_END/!b
/DOCGEN_CONFIG_START/r '"$TEMP_CONFIG"'
/DOCGEN_CONFIG_END:/!d
' <(sed '/DOCGEN_IGNORE_START/,/DOCGEN_IGNORE_END/d' README.md)
} > "$TEMP_README"
- name: Generate vimdoc
uses: kdheepak/[email protected]
with:
vimdoc: projector
pandoc: "${{ env.TEMP_README }}"
toc: true
description: "Extensible code-runner/project-configurator"
treesitter: true
ignorerawblocks: true
docmappingprojectname: false
- name: Commit the Generated Help
uses: EndBug/add-and-commit@v9
if: github.event_name == 'push'
with:
add: doc/projector.txt
author_name: Github Actions
author_email: [email protected]
message: "[docgen] Update doc/projector.txt"
pull: --rebase --autostash