Workflow Fix
This commit is contained in:
34
.github/workflows/main.yml
vendored
34
.github/workflows/main.yml
vendored
@@ -7,6 +7,8 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- 'src/**'
|
- 'src/**'
|
||||||
|
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
pages: write
|
pages: write
|
||||||
@@ -86,35 +88,3 @@ jobs:
|
|||||||
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
|
||||||
|
|
||||||
# Step 8: Build VitePress site
|
|
||||||
- name: Setup Node
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
cache: npm
|
|
||||||
|
|
||||||
- name: Setup Pages
|
|
||||||
uses: actions/configure-pages@v4
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Build with VitePress
|
|
||||||
run: npm run docs:build
|
|
||||||
|
|
||||||
- name: Upload artifact
|
|
||||||
uses: actions/upload-pages-artifact@v3
|
|
||||||
with:
|
|
||||||
path: docs/.vitepress/dist
|
|
||||||
|
|
||||||
deploy:
|
|
||||||
environment:
|
|
||||||
name: github-pages
|
|
||||||
url: ${{ steps.deployment.outputs.page_url }}
|
|
||||||
needs: build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Deploy to GitHub Pages
|
|
||||||
id: deployment
|
|
||||||
uses: actions/deploy-pages@v4
|
|
||||||
@@ -310,22 +310,6 @@ function VisualElement:blur()
|
|||||||
self:setCursor(1,1, false)
|
self:setCursor(1,1, false)
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Calculates the position of the element relative to its parent
|
|
||||||
--- @shortDescription Calculates the position of the element
|
|
||||||
--- @return number x The x position
|
|
||||||
--- @return number y The y position
|
|
||||||
function VisualElement:calculatePosition()
|
|
||||||
local x, y = self.get("x"), self.get("y")
|
|
||||||
if not self.get("ignoreOffset") then
|
|
||||||
if self.parent ~= nil then
|
|
||||||
local xO, yO = self.parent.get("offsetX"), self.parent.get("offsetY")
|
|
||||||
x = x - xO
|
|
||||||
y = y - yO
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return x, y
|
|
||||||
end
|
|
||||||
|
|
||||||
--- @shortDescription Handles a key event
|
--- @shortDescription Handles a key event
|
||||||
--- @param key number The key that was pressed
|
--- @param key number The key that was pressed
|
||||||
--- @protected
|
--- @protected
|
||||||
@@ -353,6 +337,22 @@ function VisualElement:char(char)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Calculates the position of the element relative to its parent
|
||||||
|
--- @shortDescription Calculates the position of the element
|
||||||
|
--- @return number x The x position
|
||||||
|
--- @return number y The y position
|
||||||
|
function VisualElement:calculatePosition()
|
||||||
|
local x, y = self.get("x"), self.get("y")
|
||||||
|
if not self.get("ignoreOffset") then
|
||||||
|
if self.parent ~= nil then
|
||||||
|
local xO, yO = self.parent.get("offsetX"), self.parent.get("offsetY")
|
||||||
|
x = x - xO
|
||||||
|
y = y - yO
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return x, y
|
||||||
|
end
|
||||||
|
|
||||||
--- Returns the absolute position of the element or the given coordinates.
|
--- Returns the absolute position of the element or the given coordinates.
|
||||||
--- @shortDescription Returns the absolute position of the element
|
--- @shortDescription Returns the absolute position of the element
|
||||||
---@param x? number x position
|
---@param x? number x position
|
||||||
|
|||||||
Reference in New Issue
Block a user