This commit is contained in:
Robert Jelic
2025-02-09 16:51:30 +01:00
parent 5af0d9e446
commit d27c8706d0
2 changed files with 12 additions and 7 deletions

View File

@@ -2,10 +2,10 @@ name: Build Docs
on: on:
pull_request: pull_request:
branches: branches:
- master - main
push: push:
branches: branches:
- master - main
jobs: jobs:
build: build:
name: Build docs name: Build docs
@@ -16,15 +16,16 @@ jobs:
- name: Setup Lua - name: Setup Lua
uses: leafo/gh-actions-lua@v8 uses: leafo/gh-actions-lua@v8
with: with:
luaVersion: 5.4 luaVersion: 5.3
- name: Setup Lua Rocks - name: Setup Lua Rocks
uses: leafo/gh-actions-luarocks@v4 uses: leafo/gh-actions-luarocks@v4
- name: Setup dependencies - name: Install LDoc
run: luarocks install --only-deps ldoc-dev-1.rockspec 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/master' }} 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

4
Makefile Normal file
View File

@@ -0,0 +1,4 @@
.PHONY: doc-site
doc-site:
ldoc .