LuaLS Test
This commit is contained in:
8
.github/workflows/docs.yml
vendored
8
.github/workflows/docs.yml
vendored
@@ -26,16 +26,16 @@ jobs:
|
||||
with:
|
||||
ref: gh-pages
|
||||
path: build_docs
|
||||
- name: Prepare content directory
|
||||
- name: Prepare references directory
|
||||
run: |
|
||||
mkdir -p build_docs/docs
|
||||
rm -rf build_docs/docs/content
|
||||
mkdir -p build_docs/docs/content
|
||||
rm -rf build_docs/docs/references
|
||||
mkdir -p build_docs/docs/references
|
||||
- name: Process markdown files
|
||||
run: |
|
||||
find src -type f -name "*.lua" | while read file; do
|
||||
filename=$(basename "$file")
|
||||
lua markdown.lua "$file" "build_docs/docs/content/${filename%.lua}.md"
|
||||
lua markdown.lua "$file" "build_docs/docs/references/${filename%.lua}.md"
|
||||
done
|
||||
- name: Deploy
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
|
||||
36
.github/workflows/lualsgen.yml
vendored
Normal file
36
.github/workflows/lualsgen.yml
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
name: Generate LuaLS Definitions
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'src/elements/**'
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- 'src/elements/**'
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
generate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Lua
|
||||
uses: leafo/gh-actions-lua@v8
|
||||
with:
|
||||
luaVersion: "5.4"
|
||||
|
||||
- name: Generate LuaLS definitions
|
||||
run: |
|
||||
lua annotationParser.lua src/elements src/LuaLS.lua
|
||||
|
||||
- name: Commit changes
|
||||
if: github.event_name == 'push'
|
||||
run: |
|
||||
git config --local user.email "action@github.com"
|
||||
git config --local user.name "GitHub Action"
|
||||
git add src/LuaLS.lua
|
||||
git commit -m "Update LuaLS definitions" || true
|
||||
git push
|
||||
Reference in New Issue
Block a user