Skip to content

Commit fbe2b52

Browse files
committed
Clean to be merge in master
1 parent 3687da9 commit fbe2b52

File tree

2 files changed

+18
-61
lines changed

2 files changed

+18
-61
lines changed

.github/workflows/multidocs.yml

Lines changed: 5 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: MultiDocumentation
33
on:
44
push:
55
branches:
6-
- test-multidocs
6+
- master
77
tags: '*'
88
pull_request:
99

@@ -17,9 +17,8 @@ jobs:
1717
version: '1.10.5'
1818
- uses: julia-actions/cache@v2
1919

20-
2120
- name: Set up
22-
run: git config --global init.defaultBranch test-multidocs
21+
run: git config --global init.defaultBranch master
2322

2423
# Build GNNGraphs docs
2524
- name: Install dependencies for GNNGraphs
@@ -33,14 +32,7 @@ jobs:
3332
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
3433
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
3534
run: julia --project=GNNGraphs/docs/ GNNGraphs/docs/make.jl
36-
- name: Check if objects.inv exists for GNNGraphs
37-
run: |
38-
if [ -f GNNGraphs/docs/build/objects.inv ]; then
39-
echo "GNNGraphs: objects.inv exists."
40-
else
41-
echo "GNNGraphs: objects.inv does not exist!" && exit 1
42-
fi
43-
35+
4436
# Build GNNlib docs
4537
- name: Install dependencies for GNNlib
4638
run: julia --project=GNNlib/docs/ -e 'using Pkg; Pkg.instantiate();'
@@ -49,21 +41,7 @@ jobs:
4941
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
5042
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
5143
run: julia --project=GNNlib/docs/ GNNlib/docs/make.jl
52-
- name: Check if objects.inv exists for GNNlib
53-
run: |
54-
if [ -f GNNlib/docs/build/objects.inv ]; then
55-
echo "GNNlib: objects.inv exists."
56-
else
57-
echo "GNNlib: objects.inv does not exist!" && exit 1
58-
fi
59-
- name: Check if objects.inv still exists for GNNGraphs
60-
run: |
61-
if [ -f GNNGraphs/docs/build/objects.inv ]; then
62-
echo "GNNGraphs: objects.inv exists."
63-
else
64-
echo "GNNGraphs: objects.inv does not exist!" && exit 1
65-
fi
66-
44+
6745
# Build GNNLux docs
6846
- name: Install dependencies for GNNLux
6947
run: julia --project=GNNLux/docs/ -e '
@@ -75,13 +53,6 @@ jobs:
7553
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
7654
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
7755
run: julia --project=GNNLux/docs/ GNNLux/docs/make.jl
78-
- name: Check if objects.inv exists for GNNLux
79-
run: |
80-
if [ -f GNNLux/docs/build/objects.inv ]; then
81-
echo "GNNLux: objects.inv exists."
82-
else
83-
echo "GNNLux: objects.inv does not exist!" && exit 1
84-
fi
8556

8657
# Build GraphNeuralNetworks docs
8758
- name: Install dependencies for GraphNeuralNetworks
@@ -94,15 +65,8 @@ jobs:
9465
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
9566
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
9667
run: julia --project=GraphNeuralNetworks/docs/ GraphNeuralNetworks/docs/make.jl
97-
- name: Check if objects.inv exists for GraphNeuralNetworks
98-
run: |
99-
if [ -f GraphNeuralNetworks/docs/build/objects.inv ]; then
100-
echo "GraphNeuralNetworks: objects.inv exists."
101-
else
102-
echo "GraphNeuralNetworks: objects.inv does not exist!" && exit 1
103-
fi
10468

105-
# Build GraphNeuralNetworks docs
69+
# Build multidocs
10670
- name: Install dependencies for main docs
10771
run: julia --project=GraphNeuralNetworks/docs/ -e '
10872
using Pkg;
@@ -113,13 +77,6 @@ jobs:
11377
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
11478
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
11579
run: julia --project=GraphNeuralNetworks/docs/make.jl
116-
- name: Check if objects.inv exists for GraphNeuralNetworks
117-
run: |
118-
if [ -f GraphNeuralNetworks/docs/build/objects.inv ]; then
119-
echo "GraphNeuralNetworks: objects.inv exists."
120-
else
121-
echo "GraphNeuralNetworks: objects.inv does not exist!" && exit 1
122-
fi
12380

12481
# Build tutorials
12582
- name: Install dependencies for tutorials
@@ -129,13 +86,6 @@ jobs:
12986
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
13087
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
13188
run: julia --project=tutorials/docs/ tutorials/docs/make.jl
132-
- name: Check if objects.inv exists for tutorials
133-
run: |
134-
if [ -f tutorials/docs/build/objects.inv ]; then
135-
echo "tutorials: objects.inv exists."
136-
else
137-
echo "tutorials: objects.inv does not exist!" && exit 1
138-
fi
13989

14090
# Build and deploy multidocs
14191
- name: Install dependencies for multidocs

docs/make-multi.jl

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ for (root, dirs, files) in walkdir(".")
1111
end
1212
end
1313

14-
15-
1614
docs = [
1715
MultiDocumenter.MultiDocRef(
1816
upstream = joinpath(dirname(@__DIR__),"GraphNeuralNetworks", "docs", "build"),
@@ -63,28 +61,37 @@ run(`git pull`)
6361

6462
outbranch = "dep-multidocs"
6563
has_outbranch = true
66-
run(`git restore docs/Project.toml`)
64+
65+
status_output = read(`git status --porcelain docs/Project.toml`, String)
66+
if !isempty(status_output)
67+
@info "Restoring docs/Project.toml due to changes."
68+
run(`git restore docs/Project.toml`)
69+
else
70+
@info "No changes detected in docs/Project.toml."
71+
end
72+
6773
if !success(`git checkout -f $outbranch`)
6874
has_outbranch = false
6975
if !success(`git switch --orphan $outbranch`)
70-
run(`git branch`)
71-
run(`git status`)
7276
@error "Cannot create new orphaned branch $outbranch."
7377
exit(1)
7478
end
7579
end
76-
run(`git status`)
80+
7781
@info "Cleaning up $gitroot."
7882
for file in readdir(gitroot; join = true)
7983
file == "/home/runner/work/GraphNeuralNetworks.jl/GraphNeuralNetworks.jl/docs" && continue
8084
endswith(file, ".git") && continue
8185
rm(file; force = true, recursive = true)
8286
end
87+
8388
@info "Copying aggregated documentation to $gitroot."
8489
for file in readdir(outpath)
8590
cp(joinpath(outpath, file), joinpath(gitroot, file))
8691
end
92+
8793
rm("/home/runner/work/GraphNeuralNetworks.jl/GraphNeuralNetworks.jl/docs"; force = true, recursive = true)
94+
8895
run(`git add .`)
8996
if success(`git commit -m 'Aggregate documentation'`)
9097
@info "Pushing updated documentation."

0 commit comments

Comments
 (0)