forked from lunarmodules/ldoc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add gh action to build documentation site
Related lunarmodules#332. Add doc-site target to make file and yml file to build the docs. Following domenic's guide [1] but using leafo's gh actions like luacheck.yml. Builds the documentation for ldoc using the checked out version of ldoc and uses peaceiris/actions-gh-pages to publish. Once merged, docs will be available on https://lunarmodules.github.io/LDoc [1]: https://gist.github.com/domenic/ec8b0fc8ab45f39403dd
- Loading branch information
Showing
2 changed files
with
35 additions
and
0 deletions.
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,32 @@ | ||
# Based on https://gist.github.com/domenic/ec8b0fc8ab45f39403dd | ||
name: Build Docs | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
build: | ||
name: Build docs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
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 dependencies | ||
run: luarocks install --only-deps https://raw.githubusercontent.com/lunarmodules/LDoc/master/ldoc-scm-3.rockspec | ||
- name: Build docs | ||
run: make doc-site | ||
- 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: ./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