-
-
Notifications
You must be signed in to change notification settings - Fork 12
45 lines (40 loc) · 1.9 KB
/
lua-doc.yml
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Generate lua docs
run-name: "github-actions[bot] is generating lua docs"
on: push
jobs:
generate-lua-docs:
name: Generate lua docs
runs-on: windows-latest
steps:
- uses: actions/[email protected]
- name: Setup GitHub
run: |
# https://api.github.com/users/github-actions%5Bbot%5D
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Generate lua docs with lua-language-server
shell: cmd
run: |
${{ github.workspace }}\\.building\\lua-language-server-3.6.18-win32-x64\\bin\\lua-language-server.exe ^
--logpath \"${{ github.workspace }}\\docs\\lua-docs\" ^
--configpath \"${{ github.workspace }}\\docs\\lua-docs\\lua-language-server-config.lua\" ^
--doc \"${{ github.workspace }}\\mods\\noita-mp\\files\\scripts\"
cd ${{ github.workspace }}\\docs\\lua-docs\\
del /f *.log
- name: Format lua docs
run: |
$env:Path += ";C:\Program Files\Git\usr\bin"
Get-Command sed
cd ${{ github.workspace }}\\docs\\lua-docs\\
echo "Replacing filepaths"
sed -i 's#file:///d%3A/a/NoitaMP/NoitaMP/#${{ github.server_url }}/${{ github.repository }}#g' ${{ github.workspace }}\\docs\\lua-docs\\doc.md
sed -i 's#file:///d%3A/a/NoitaMP/NoitaMP/#${{ github.server_url }}/${{ github.repository }}#g' ${{ github.workspace }}\\docs\\lua-docs\\doc.json
echo "Adding #L's"
sed -i 's/.lua#/.lua#L/g' ${{ github.workspace }}\\docs\\lua-docs\\doc.md
echo "Replacing headers in .md"
sed -i 's#\# #\#\# #g' ${{ github.workspace }}\\docs\\lua-docs\\doc.md
- name: Commit and push changes
run: |
git add .
git commit -m "Generate lua docs"
git push origin