Linting #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate docs | |
on: push | |
permissions: | |
contents: write | |
jobs: | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone project | |
uses: actions/checkout@v3 | |
- name: Create docs directory | |
# lua-doc-parser should really handle this | |
run: | | |
mkdir .docs | |
- name: Parse and generate docs | |
uses: p3lim/lua-doc-parser@v2 | |
with: | |
output: .docs | |
- name: Inject docs into readme | |
run: | | |
ex README.md << EOF | |
/DOCSTART/+1,/DOCEND/-1 d | |
-1 r .docs/*.md | |
wq | |
EOF | |
- name: Push docs | |
run: | | |
git config user.name 'GitHub Actions' | |
git config user.email [email protected] | |
git add README.md | |
git diff --quiet HEAD || git commit -m 'ci: update documentation' | |
git push |