Update docs workflow #48
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: | ||
branches: | ||
- master | ||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone wiki | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ github.repository }}.wiki | ||
- name: Clone project | ||
uses: actions/checkout@v4 | ||
with: | ||
path: addon | ||
- name: Parse and generate docs | ||
uses: p3lim/lua-doc-parser@v2 | ||
working-directory: addon | ||
with: | ||
output: ${{ github.workspace }} | ||
- name: Setup Git | ||
run: | | ||
git config user.name 'github-actions[bot]' | ||
git config user.email "<41898282+github-actions[bot]@users.noreply.github.com>" | ||
- name: Commit and push docs | ||
run: | | ||
git add *.md | ||
git diff --quiet HEAD || git commit -m '${{ github.sha }}' | ||
git push |