Skip to content

Commit f85f87b

Browse files
try new approach for building and deploying docs (#552)
1 parent 7bd58c6 commit f85f87b

File tree

13 files changed

+248
-320
lines changed

13 files changed

+248
-320
lines changed

.github/workflows/multidocs.yml

Lines changed: 15 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: MultiDocumentation
1+
name: Docs
22

33
on:
44
push:
@@ -8,87 +8,26 @@ on:
88
pull_request:
99

1010
jobs:
11-
build_multidocs:
11+
docs:
1212
runs-on: ubuntu-latest
13+
env:
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
15+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
1316
steps:
1417
- uses: actions/checkout@v4
1518
- uses: julia-actions/setup-julia@v2
1619
with:
17-
version: '1.10.5'
20+
version: '1'
1821
- uses: julia-actions/cache@v2
19-
20-
- name: Set up
21-
run: git config --global init.defaultBranch master
22-
23-
- name: Build GNNGraphs docs
24-
run:
25-
julia --project=GNNGraphs/docs/ -e '
26-
using Pkg;
27-
pkg"dev ./GNNGraphs";
28-
Pkg.instantiate();
29-
include("GNNGraphs/docs/make.jl")'
30-
env:
31-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
32-
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
33-
34-
- name: Build GNNlib docs
35-
run: julia --project=GNNlib/docs/ -e '
36-
using Pkg;
37-
pkg"dev ./GNNlib ./GNNGraphs";
38-
Pkg.instantiate();
39-
include("GNNlib/docs/make.jl")'
40-
env:
41-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
42-
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
43-
44-
- name: Build GNNLux docs
45-
run: julia --project=GNNLux/docs/ -e '
46-
using Pkg;
47-
pkg"dev ./GNNLux ./GNNlib ./GNNGraphs";
48-
Pkg.instantiate();
49-
include("GNNLux/docs/make.jl")'
50-
env:
51-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
52-
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
53-
54-
- name: Build GraphNeuralNetworks docs
55-
run: julia --project=GraphNeuralNetworks/docs/ -e '
56-
using Pkg;
57-
pkg"dev ./GraphNeuralNetworks ./GNNlib ./GNNGraphs";
58-
Pkg.instantiate();
59-
include("GraphNeuralNetworks/docs/make.jl")'
60-
env:
61-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
62-
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
63-
64-
65-
# Build and deploy multidocs
66-
- name: Install dependencies for multidocs
67-
run: julia --project=docs/ -e '
68-
using Pkg;
69-
pkg"dev ./GraphNeuralNetworks ./GNNlib ./GNNGraphs ./GNNLux";
70-
Pkg.instantiate();'
71-
- name: Check if objects.inv exists for GraphNeuralNetworks
72-
run: |
73-
if [ -f GraphNeuralNetworks/docs/build/objects.inv ]; then
74-
echo "GraphNeuralNetworks: objects.inv exists."
75-
else
76-
echo "GraphNeuralNetworks: objects.inv does not exist!" && exit 1
77-
fi
78-
- name: Config git
79-
env:
80-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
81-
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
22+
# Build individual docs
23+
- run: julia GNNGraphs/docs/make.jl
24+
- run: julia GNNlib/docs/make.jl
25+
- run: julia GNNLux/docs/make.jl
26+
- run: julia GraphNeuralNetworks/docs/make.jl
27+
# Compile multi docs
28+
- name: MultiDocs
8229
run: |
8330
git config user.name github-actions
8431
git config user.email [email protected]
85-
86-
- name: Build multidocs
87-
if: github.event_name == 'pull_request'
88-
run: |
89-
julia --project=docs/ docs/make-multi.jl PR
90-
91-
- name: Build and deploy multidocs
92-
if: github.event_name != 'pull_request'
93-
run: |
94-
julia --project=docs/ docs/make-multi.jl
32+
julia --project=docs/ -e 'using Pkg; Pkg.instantiate()'
33+
julia --project=docs/ docs/make-multi.jl

GNNGraphs/docs/Project.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
33
DocumenterInterLinks = "d12716ef-a0f6-4df4-a9f1-a5a34e75c656"
44
GNNGraphs = "aed8fd31-079b-4b5a-b342-a13352159b8c"
55
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
6-
LiveServer = "16fef848-5104-11e9-1b77-fb7a48bbb589"
76
MLDatasets = "eb30cadb-4394-5ae3-aed4-317e484a6458"
87
MLUtils = "f1d291b0-491e-4a28-83b9-f70985020b54"
98
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

GNNGraphs/docs/make.jl

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
using Pkg
2+
Pkg.activate(@__DIR__)
3+
Pkg.develop(path=joinpath(@__DIR__, ".."))
4+
Pkg.instantiate()
5+
16
using Documenter
27
using DocumenterInterLinks
38
using GNNGraphs
@@ -27,25 +32,29 @@ makedocs(;
2732
size_threshold=nothing,
2833
size_threshold_warn=200000),sitename = "GNNGraphs.jl",
2934
pages = [
30-
"Home" => "index.md",
31-
32-
"Guides" => [
33-
"Graphs" => "guides/gnngraph.md",
34-
"Heterogeneous Graphs" => "guides/heterograph.md",
35-
"Temporal Graphs" => "guides/temporalgraph.md",
36-
"Datasets" => "guides/datasets.md",
37-
],
35+
"Home" => "index.md",
36+
37+
"Guides" => [
38+
"Graphs" => "guides/gnngraph.md",
39+
"Heterogeneous Graphs" => "guides/heterograph.md",
40+
"Temporal Graphs" => "guides/temporalgraph.md",
41+
"Datasets" => "guides/datasets.md",
42+
],
3843

39-
"API Reference" => [
40-
"GNNGraph" => "api/gnngraph.md",
41-
"GNNHeteroGraph" => "api/heterograph.md",
42-
"TemporalSnapshotsGNNGraph" => "api/temporalgraph.md",
43-
"Samplers" => "api/samplers.md",
44-
],
44+
"API Reference" => [
45+
"GNNGraph" => "api/gnngraph.md",
46+
"GNNHeteroGraph" => "api/heterograph.md",
47+
"TemporalSnapshotsGNNGraph" => "api/temporalgraph.md",
48+
"Samplers" => "api/samplers.md",
49+
"Datasets" => "api/datasets.md",
50+
],
4551
]
4652
)
47-
48-
deploydocs(repo = "github.com/JuliaGraphs/GraphNeuralNetworks.jl.git",
49-
devbranch = "master",
50-
dirname = "GNNGraphs",
51-
tag_prefix="GNNGraphs-")
53+
54+
deploydocs(
55+
repo = "github.com/JuliaGraphs/GraphNeuralNetworks.jl",
56+
target = "build",
57+
branch = "docs-gnngraphs",
58+
devbranch = "master",
59+
tag_prefix="GNNGraphs-",
60+
)

GNNGraphs/docs/src/api/datasets.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
```@meta
2+
CurrentModule = GNNGraphs
3+
CollapsedDocStrings = true
4+
```
5+
6+
# Datasets
7+
8+
```@docs
9+
mldataset2gnngraph
10+
```

GNNGraphs/docs/src/api/gnngraph.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,42 +21,42 @@ Base.copy
2121

2222
## DataStore
2323

24-
```@autodocs
24+
```@autodocs; canonical = true
2525
Modules = [GNNGraphs]
2626
Pages = ["datastore.jl"]
2727
Private = false
2828
```
2929

3030
## Query
3131

32-
```@autodocs
32+
```@autodocs; canonical = true
3333
Modules = [GNNGraphs]
3434
Pages = ["src/query.jl"]
3535
Private = false
3636
```
3737

38-
```@docs
38+
```@docs; canonical = true
3939
Graphs.neighbors(::GNNGraph, ::Integer)
4040
```
4141

4242
## Transform
4343

44-
```@autodocs
44+
```@autodocs; canonical = true
4545
Modules = [GNNGraphs]
4646
Pages = ["src/transform.jl"]
4747
Private = false
4848
```
4949

5050
## Utils
5151

52-
```@docs
52+
```@docs; canonical = true
5353
GNNGraphs.sort_edge_index
5454
GNNGraphs.color_refinement
5555
```
5656

5757
## Generate
5858

59-
```@autodocs
59+
```@autodocs; canonical = true
6060
Modules = [GNNGraphs]
6161
Pages = ["src/generate.jl"]
6262
Private = false
@@ -65,24 +65,24 @@ Filter = t -> typeof(t) <: Function && t!=rand_temporal_radius_graph && t!=rand_
6565

6666
## Operators
6767

68-
```@autodocs
68+
```@autodocs; canonical = true
6969
Modules = [GNNGraphs]
7070
Pages = ["src/operators.jl"]
7171
Private = false
7272
```
7373

74-
```@docs
74+
```@docs; canonical = true
7575
Base.intersect
7676
```
7777

7878
## Sampling
7979

80-
```@autodocs
80+
```@autodocs; canonical = true
8181
Modules = [GNNGraphs]
8282
Pages = ["src/sampling.jl"]
8383
Private = false
8484
```
8585

86-
```@docs
86+
```@docs; canonical = true
8787
Graphs.induced_subgraph(::GNNGraph, ::Vector{Int})
8888
```

GNNGraphs/docs/src/guides/datasets.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,3 @@ For graphs with static structures and temporal features, datasets such as METRLA
55

66
GraphNeuralNetworks.jl provides the [`mldataset2gnngraph`](@ref) method for interfacing with MLDatasets.jl.
77

8-
```@docs
9-
mldataset2gnngraph
10-
```

0 commit comments

Comments
 (0)