Skip to content

Commit 0a112b9

Browse files
authored
ci: fix docs publishing workflow (#30)
Adds missing `luaVersion` workflow parameter to manual-build-docs. Also ensures `ldoc` is install on the CI runner.
1 parent b0579a8 commit 0a112b9

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

.github/actions/build-docs/action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ description: 'Build Documentation.'
44
runs:
55
using: composite
66
steps:
7+
- name: Install LDoc
8+
shell: bash
9+
run: sudo apt-get update -y && sudo apt-get install -y lua-ldoc
710
- name: Build Documentation
811
shell: bash
9-
run: ./scripts/build-docs.sh docs
12+
run: ./scripts/build-docs.sh docs-build docs-release

.github/actions/publish-docs/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ runs:
1111
- uses: launchdarkly/gh-actions/actions/publish-pages@publish-pages-v1.0.1
1212
name: 'Publish to Github pages'
1313
with:
14-
docs_path: docs
14+
docs_path: docs-release
1515
github_token: ${{ inputs.token }}

.github/workflows/manual-publish-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Build and Test
1515
uses: ./.github/actions/ci
1616
with:
17-
token: ${{ secrets.GITHUB_TOKEN }}
17+
lua-version: "5.3"
1818

1919
- name: Build documentation
2020
uses: ./.github/actions/build-docs

scripts/build-docs.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,19 @@
33
set -e
44

55
# The first argument is the directory where the docs should be built.
6+
# The second is where the docs should be copied to when built.
67

7-
if [ -z "$1" ]; then
8-
echo "Usage: $0 <docs-build-dir>"
8+
if [ "$#" -ne 2 ]; then
9+
echo "Usage: $0 <docs build dir> <docs release dir>"
910
exit 1
1011
fi
1112

1213
DOCS_BUILD_DIR=$1
14+
DOCS_RELEASE_DIR=$2
15+
1316
mkdir "$DOCS_BUILD_DIR"
1417

1518
cp launchdarkly-server-sdk.c "$DOCS_BUILD_DIR"
1619
cp launchdarkly-server-sdk-redis.c "$DOCS_BUILD_DIR"
1720

18-
ldoc -d "$LD_RELEASE_DOCS_DIR" "$DOCS_BUILD_DIR"
21+
ldoc -d "$DOCS_RELEASE_DIR" "$DOCS_BUILD_DIR"

0 commit comments

Comments
 (0)