aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2020-02-20 08:06:29 +0100
committerMarc André Tanner <mat@brain-dump.org>2020-02-20 13:50:07 +0100
commit2a4a9eeea4e1930ac2be2499408f9b06de55747d (patch)
treee72535d84fab5b7e75adb59f4e7b0e58879e1c20 /.github
parent1efb91ce7f28f5b0c402ff250bcd89049fe19853 (diff)
downloadvis-2a4a9eeea4e1930ac2be2499408f9b06de55747d.tar.gz
vis-2a4a9eeea4e1930ac2be2499408f9b06de55747d.tar.xz
ci: add Lua API documentation generation
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/luadoc.yml39
1 files changed, 39 insertions, 0 deletions
diff --git a/.github/workflows/luadoc.yml b/.github/workflows/luadoc.yml
new file mode 100644
index 0000000..50d9c9c
--- /dev/null
+++ b/.github/workflows/luadoc.yml
@@ -0,0 +1,39 @@
+name: Lua API
+
+on:
+ push:
+ paths:
+ - 'vis-lua.c'
+ - 'lua/**'
+
+jobs:
+ luadoc:
+ runs-on: ubuntu-latest
+ steps:
+
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Dependency
+ run: sudo apt install lua-ldoc
+
+ - name: LDoc patch
+ run: sudo patch -d /usr/share/lua/5.1 -p1 < lua/doc/README.md
+
+ - name: Documentation generation
+ run: make luadoc
+
+ - name: Upload
+ env:
+ DEPLOY_TOKEN: ${{ secrets.GITHUB_DEPLOY_TOKEN }}
+ run: |
+ git clone --depth=1 --single-branch --branch gh-pages "https://x-access-token:${DEPLOY_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" /tmp/gh-pages
+ git config --global user.name "${GITHUB_ACTOR}"
+ git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
+ mkdir -p /tmp/gh-pages/doc
+ rm -f /tmp/gh-pages/doc/*
+ cp -av lua/doc/*.html /tmp/gh-pages/doc/
+ cp -av lua/doc/*.css /tmp/gh-pages/doc/
+ cd /tmp/gh-pages
+ git add -A && git commit --allow-empty -am "Publishing from ${GITHUB_REPOSITORY} ${GITHUB_SHA}"
+ git push origin gh-pages