Test
This commit is contained in:
7
.github/workflows/docs.yml
vendored
7
.github/workflows/docs.yml
vendored
@@ -1,3 +1,4 @@
|
|||||||
|
# Based on https://gist.github.com/domenic/ec8b0fc8ab45f39403dd
|
||||||
name: Build Docs
|
name: Build Docs
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
@@ -19,13 +20,13 @@ jobs:
|
|||||||
luaVersion: 5.4
|
luaVersion: 5.4
|
||||||
- name: Setup Lua Rocks
|
- name: Setup Lua Rocks
|
||||||
uses: leafo/gh-actions-luarocks@v4
|
uses: leafo/gh-actions-luarocks@v4
|
||||||
- name: Install LDoc
|
- name: Setup dependencies
|
||||||
run: luarocks install ldoc
|
run: luarocks install ldoc
|
||||||
- name: Build docs
|
- name: Build docs
|
||||||
run: make doc-site
|
run: make doc-site
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
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: ./docs
|
publish_dir: ./out
|
||||||
11
Makefile
11
Makefile
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
LUA= $(shell echo `which lua`)
|
LUA= $(shell echo `which lua`)
|
||||||
LUA_BINDIR= $(shell echo `dirname $(LUA)`)
|
LUA_BINDIR= $(shell echo `dirname $(LUA)`)
|
||||||
LUA_PREFIX= $(shell echo `dirname $(LUA_BINDIR)`)
|
LUA_PREFIX= $(shell echo `dirname $(LUA_BINDIR)`)
|
||||||
@@ -30,10 +31,10 @@ uninstall:
|
|||||||
|
|
||||||
test: test-basic test-example test-md test-tables
|
test: test-basic test-example test-md test-tables
|
||||||
|
|
||||||
RUN=&& lua $(_REPODIR)/ldoc.lua . && diff -r docs cdocs && echo ok
|
RUN=&& lua $(_REPODIR)/ldoc.lua . && diff -r doc cdocs && echo ok
|
||||||
|
|
||||||
test-prep:
|
test-prep:
|
||||||
find -type d -name docs -execdir rsync -av --del {}/ cdocs/ \;
|
find -type d -name doc -execdir rsync -av --del {}/ cdocs/ \;
|
||||||
|
|
||||||
test-basic:
|
test-basic:
|
||||||
cd tests $(RUN)
|
cd tests $(RUN)
|
||||||
@@ -50,9 +51,9 @@ test-tables:
|
|||||||
test-clean: clean-basic clean-example clean-md clean-tables
|
test-clean: clean-basic clean-example clean-md clean-tables
|
||||||
|
|
||||||
doc-site:
|
doc-site:
|
||||||
cd $(_REPODIR)/docs && lua $(_REPODIR)/ldoc.lua .
|
cd $(_REPODIR)/doc && lua $(_REPODIR)/ldoc.lua .
|
||||||
|
|
||||||
CLEAN=&& lua $(_REPODIR)/ldoc.lua . && rd /S /Q cdocs && cp -rf docs cdocs
|
CLEAN=&& lua $(_REPODIR)/ldoc.lua . && rd /S /Q cdocs && cp -rf doc cdocs
|
||||||
|
|
||||||
clean-basic:
|
clean-basic:
|
||||||
cd tests $(CLEAN)
|
cd tests $(CLEAN)
|
||||||
@@ -64,4 +65,4 @@ clean-md:
|
|||||||
cd tests && cd md-test $(CLEAN)
|
cd tests && cd md-test $(CLEAN)
|
||||||
|
|
||||||
clean-tables:
|
clean-tables:
|
||||||
cd tests && cd simple $(CLEAN)
|
cd tests && cd simple $(CLEAN)
|
||||||
|
|||||||
@@ -2,6 +2,6 @@ project = 'Basalt2'
|
|||||||
title = 'Basalt Documentation'
|
title = 'Basalt Documentation'
|
||||||
description = 'A UI Framework for ComputerCraft'
|
description = 'A UI Framework for ComputerCraft'
|
||||||
file = {'src'}
|
file = {'src'}
|
||||||
dir = 'docs'
|
dir = 'out'
|
||||||
format = 'markdown'
|
format = 'markdown'
|
||||||
all = true
|
all = true
|
||||||
Reference in New Issue
Block a user