-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Related #11. Builds docs to the gh-pages branch on every push to master. Also updates all dead links to point to live ones (or ones that will be live after this is merged). Uses three third-party gh actions: * leafo/gh-actions-lua@v8 * leafo/gh-actions-luarocks@v4 * peaceiris/actions-gh-pages@v3 * This receives secrets.GITHUB_TOKEN Also switches to the new ldoc css and moves doc output folder to ./doc/out which is less confusing when configuring than ./doc/doc. Once merged, docs will be available on https://excessive.github.io/cpml/ Currently, you can see the built docs on https://idbrii.github.io/love-cpml/
- Loading branch information
Showing
4 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Based on https://gist.github.com/domenic/ec8b0fc8ab45f39403dd | ||
name: Documentation | ||
|
||
on: | ||
pull_request: # Build on pull requests to ensure they don't break docs. | ||
branches: | ||
- master | ||
push: # We'll only push new docs when master is updated (see below). | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
name: Build Docs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Lua | ||
uses: leafo/gh-actions-lua@v8 | ||
with: | ||
luaVersion: 5.4 | ||
- name: Setup Lua Rocks | ||
uses: leafo/gh-actions-luarocks@v4 | ||
- name: Setup and run ldoc | ||
run: bash ./doc/install_and_build_docs | ||
- name: Deploy | ||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./doc/out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# LDoc generated files. | ||
doc/doc | ||
doc/out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,6 @@ file = { | |
"../init.lua", | ||
"../modules" | ||
} | ||
dir='./out' | ||
readme='../README.md' | ||
style='!new' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#! /bin/sh | ||
|
||
# on github, leafo/gh-actions-lua leafo/gh-actions-luarocks setup luarocks for us. | ||
#~ sudo apt-get install lua5.3 liblua5.3-dev luarocks | ||
|
||
# github ldoc is far ahead of the released version. | ||
echo ldoc version: | ||
git ls-remote https://github.com/lunarmodules/LDoc master | ||
luarocks --local install https://raw.githubusercontent.com/lunarmodules/LDoc/master/ldoc-scm-3.rockspec | ||
|
||
echo | ||
cd ./doc | ||
~/.luarocks/bin/ldoc . |