Testii
This commit is contained in:
28
.github/workflows/main.yml
vendored
28
.github/workflows/main.yml
vendored
@@ -32,19 +32,7 @@ jobs:
|
|||||||
# Step 2: Generate LuaLS Definitions
|
# Step 2: Generate LuaLS Definitions
|
||||||
- name: Generate LuaLS
|
- name: Generate LuaLS
|
||||||
run: |
|
run: |
|
||||||
# Remove potential old file
|
lua tools/annotationParser.lua src/elements src/LuaLS.lua
|
||||||
rm -f src/elements/src/LuaLS.lua
|
|
||||||
|
|
||||||
# Generate with correct paths
|
|
||||||
lua tools/annotationParser.lua ./src/elements ./src/LuaLS.lua
|
|
||||||
|
|
||||||
# Verify generation
|
|
||||||
if [ -f "./src/LuaLS.lua" ]; then
|
|
||||||
echo "LuaLS.lua generated successfully"
|
|
||||||
else
|
|
||||||
echo "Failed to generate LuaLS.lua"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Step 3: Bundle and Minify
|
# Step 3: Bundle and Minify
|
||||||
- name: Bundle and Minify
|
- name: Bundle and Minify
|
||||||
@@ -55,19 +43,27 @@ jobs:
|
|||||||
# Step 4: Prepare and Generate Documentation
|
# Step 4: Prepare and Generate Documentation
|
||||||
- name: Prepare docs directory
|
- name: Prepare docs directory
|
||||||
run: |
|
run: |
|
||||||
mkdir -p build_docs/docs/references
|
# Checkout gh-pages branch in a separate directory
|
||||||
|
git worktree add gh-pages gh-pages
|
||||||
|
|
||||||
|
# Only clean references directory
|
||||||
|
rm -rf gh-pages/docs/references
|
||||||
|
mkdir -p gh-pages/docs/references
|
||||||
|
|
||||||
- name: Generate Documentation
|
- name: Generate Documentation
|
||||||
run: |
|
run: |
|
||||||
lua tools/generate-docs.lua
|
lua tools/generate-docs.lua
|
||||||
|
|
||||||
|
cp -r build_docs/docs/references/* gh-pages/docs/references/
|
||||||
|
|
||||||
# Step 5: Deploy Documentation
|
# Step 5: Deploy Documentation
|
||||||
- name: Deploy Documentation
|
- name: Deploy Documentation
|
||||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./build_docs
|
publish_dir: ./gh-pages
|
||||||
|
keep_files: true
|
||||||
|
|
||||||
# Step 6: Generate Changelog
|
# Step 6: Generate Changelog
|
||||||
- name: Generate Changelog
|
- name: Generate Changelog
|
||||||
@@ -81,6 +77,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git config --global user.name 'github-actions[bot]'
|
git config --global user.name 'github-actions[bot]'
|
||||||
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
|
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
|
||||||
git add config.lua "src/LuaLS.lua" release/basalt.lua CHANGELOG.md
|
git add config.lua src/LuaLS.lua release/basalt.lua CHANGELOG.md
|
||||||
git commit -m "Update config, LuaLS definitions, bundle and changelog" || exit 0
|
git commit -m "Update config, LuaLS definitions, bundle and changelog" || exit 0
|
||||||
git push
|
git push
|
||||||
@@ -197,12 +197,6 @@ function basalt.run(isActive)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Starts the Basalt runtime
|
|
||||||
--- @param isActive? boolean Whether to start active (default: true)
|
|
||||||
--- @usage basalt.autoUpdate()
|
|
||||||
--- @usage basalt.autoUpdate(false)
|
|
||||||
basalt.autoUpdate = basalt.run
|
|
||||||
|
|
||||||
function basalt.getAPI(name)
|
function basalt.getAPI(name)
|
||||||
return elementManager.getAPI(name)
|
return elementManager.getAPI(name)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user