Skip to content

Commit 7c5477b

Browse files
committed
publish: use +stdlib/html per matlab defaults
1 parent e49ea3b commit 7c5477b

File tree

3 files changed

+18
-12
lines changed

3 files changed

+18
-12
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ jobs:
5959
# "Error using publish Only MATLAB code can be published"
6060

6161
- name: Upload artifact
62-
uses: actions/upload-pages-artifact@v3
62+
uses: actions/upload-pages-artifact@v4
6363
with:
64-
path: 'docs/'
64+
path: '+stdlib/html/'
6565

6666
- name: Deploy to GitHub Pages
6767
id: deployment

.gitignore

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ release/
1010
resources/
1111
.buildtool/
1212
*.asv
13-
docs/
13+
+stdlib/html/
1414

1515
*.mex*
16-
*.oct
16+
*.exe
1717

18-
test/printenv.exe
19-
test/stdout_stderr_c.exe
20-
test/stdout_stderr_fortran.exe
21-
test/stdin_cpp.exe
22-
test/stdin_fortran.exe
23-
test/sleep.exe
18+
test/printenv
19+
test/stdout_stderr_c
20+
test/stdout_stderr_fortran
21+
test/stdin_cpp
22+
test/stdin_fortran
23+
test/sleep

buildfile.m

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,19 @@
107107

108108
function publishTask(context)
109109
% publish HTML inline documentation strings to individual HTML files
110-
outdir = fullfile(context.Plan.RootFolder, 'docs');
110+
%
111+
% References:
112+
% https://www.mathworks.com/help/matlab/matlab_prog/display-custom-documentation.html
113+
% https://www.mathworks.com/help/matlab/matlab_prog/create-a-help-summary-contents-m.html
114+
115+
pkg_root = fullfile(context.Plan.RootFolder, '+stdlib');
116+
html_dir = fullfile(pkg_root, 'html');
111117
styleFile = fullfile(context.Plan.RootFolder, "private/style.css");
112118

113119
readme = publish_gen_index_html("stdlib", ...
114120
"A standard library of functions for Matlab.", ...
115121
"https://github.com/geospace-code/matlab-stdlib", ...
116-
outdir, styleFile);
122+
html_dir, styleFile);
117123

118124
fprintf("\nweb('file:///%s') to view docs\n\n", readme);
119125
end

0 commit comments

Comments
 (0)