-
Notifications
You must be signed in to change notification settings - Fork 88
31 lines (29 loc) · 1.1 KB
/
_generate-docs.yml
File metadata and controls
31 lines (29 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Generate Documentation
on:
workflow_call:
jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Generate doc.lua file
run: |
python3 .github/scripts/docs/generate-doc.py LibCustomNames.addon docs-lua
- name: Generate docs with emmylua_doc_cli
run: |
URL=$(curl -s https://api.github.com/repos/EmmyLuaLs/emmylua-analyzer-rust/releases/latest | jq -r '.assets[] | select(.name? | match("emmylua_doc_cli-linux-x64.tar.gz$")) | .browser_download_url')
if [ -n "$URL" ]; then
curl -L "$URL" -o emmylua_doc_cli-linux-x64.tar.gz
else
echo "::error:: ❌ File not found in latest release."
exit 1
fi
tar -xzf emmylua_doc_cli-linux-x64.tar.gz
chmod +x emmylua_doc_cli
./emmylua_doc_cli --output ./docs-md ./docs-lua
- name: Deploy docs
uses: mhausenblas/mkdocs-deploy-gh-pages@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CONFIG_FILE: docs-md/mkdocs.yml