Skip to content

Commit ee8fd2f

Browse files
joa-quimclaude
andcommitted
Add Documenter GitHub Actions workflow; fix docs build
- New .github/workflows/documentation.yml: builds docs/ and deploys to gh-pages via GITHUB_TOKEN on push to master. - docs/make.jl: repo/canonical URLs were still pointing at a stale joa-quim/InteractiveGMT.jl fork; point at GenericMappingTools/InteractiveGMT. Use Documenter.Remotes.GitHub instead of a raw URL string (fixes a "could not auto-detect repository root" warning). Added the missing hillshade.md page title. - docs/src/95-reference.md: the @autodocs `filters` keyword isn't valid in the installed Documenter version (silently ignored, so internals leaked into the API reference); replaced with the correct singular `Filter` keyword. Also set checkdocs=:none in make.jl since 95-reference.md hand-curates the public API and isn't meant to require every internal docstring to appear somewhere. Verified: `julia --project=docs docs/make.jl` builds docs/build cleanly (deploy step self-skips outside CI, as expected). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 4ec3368 commit ee8fd2f

3 files changed

Lines changed: 41 additions & 9 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags: '*'
8+
pull_request:
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: write
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: julia-actions/setup-julia@v2
20+
with:
21+
version: '1.10'
22+
- uses: julia-actions/cache@v2
23+
- name: Install docs dependencies
24+
run: julia --project=docs -e 'using Pkg; Pkg.instantiate()'
25+
- name: Build and deploy docs
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
run: julia --project=docs docs/make.jl

docs/make.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const titles = Dict(
1616
"60-geography.md" => "Geography Tools",
1717
"70-tools.md" => "Tools",
1818
"95-reference.md" => "API Reference",
19+
"hillshade.md" => "Hillshade",
1920
)
2021

2122
function recursively_list_pages(folder; path_prefix="")
@@ -69,11 +70,12 @@ end
6970

7071
makedocs(;
7172
modules = [InteractiveGMT],
73+
checkdocs = :none, # API reference (95-reference.md) is hand-curated -- don't require every docstring to appear
7274
authors = "Joaquim Luis <jluis@ualg.pt>",
73-
repo = "https://github.com/joa-quim/InteractiveGMT.jl/blob/{commit}{path}#{line}",
75+
repo = Documenter.Remotes.GitHub("GenericMappingTools", "InteractiveGMT"),
7476
sitename = "InteractiveGMT.jl",
75-
format = Documenter.HTML(; canonical = "https://joa-quim.github.io/InteractiveGMT.jl"),
77+
format = Documenter.HTML(; canonical = "https://GenericMappingTools.github.io/InteractiveGMT"),
7678
pages = list_pages(),
7779
)
7880

79-
deploydocs(; repo = "github.com/joa-quim/InteractiveGMT.jl")
81+
deploydocs(; repo = "github.com/GenericMappingTools/InteractiveGMT.git", devbranch = "master")

docs/src/95-reference.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,12 @@ fig = xyplot([x y]) # Returns QtXYPlot
134134

135135
```@autodocs
136136
Modules = [InteractiveGMT]
137-
filters = [
138-
# Exclude internal functions (starting with _)
139-
s -> startswith(s, "_"),
140-
# Exclude module docstring
141-
s -> s == :InteractiveGMT,
142-
]
137+
Filter = function(x)
138+
try
139+
n = string(nameof(x))
140+
return n != "InteractiveGMT" && !startswith(n, "_")
141+
catch
142+
true
143+
end
144+
end
143145
```

0 commit comments

Comments
 (0)