@@ -55,52 +55,54 @@ MultiDocumenter.make(
5555cp (joinpath (@__DIR__ , " logo.svg" 
5656    joinpath (outpath, " logo.svg" 
5757
58- @warn  " Deploying to GitHub as MultiDocumenter" 
59- gitroot =  normpath (joinpath (@__DIR__ , " .." 
60- run (` git pull` 
58+ if  " PR" in  ARGS 
59+     @warn  " Deploying to GitHub as MultiDocumenter" 
60+     gitroot =  normpath (joinpath (@__DIR__ , " .." 
61+     run (` git pull` 
6162
62- outbranch =  " dep-multidocs" 
63- has_outbranch =  true 
63+      outbranch =  " dep-multidocs" 
64+      has_outbranch =  true 
6465
65- status_output =  read (` git status --porcelain docs/Project.toml` 
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 
66+      status_output =  read (` git status --porcelain docs/Project.toml` 
67+      if  ! isempty (status_output)
68+          @info  " Restoring docs/Project.toml due to changes." 
69+          run (` git restore docs/Project.toml` 
70+      else 
71+          @info  " No changes detected in docs/Project.toml." 
72+      end 
7273
73- if  ! success (` git checkout -f $outbranch ` 
74-     has_outbranch =  false 
75-     if  ! success (` git switch --orphan $outbranch ` 
76-         @error  " Cannot create new orphaned branch $outbranch ." 
77-         exit (1 )
74+     if  ! success (` git checkout -f $outbranch ` 
75+         has_outbranch =  false 
76+         if  ! success (` git switch --orphan $outbranch ` 
77+             @error  " Cannot create new orphaned branch $outbranch ." 
78+             exit (1 )
79+         end 
7880    end 
79- end 
8081
81- @info  " Cleaning up $gitroot ." 
82- for  file in  readdir (gitroot; join =  true )
83-     file ==  " /home/runner/work/GraphNeuralNetworks.jl/GraphNeuralNetworks.jl/docs" &&  continue 
84-     endswith (file, " .git" &&  continue 
85-     rm (file; force =  true , recursive =  true )
86- end 
82+      @info  " Cleaning up $gitroot ." 
83+      for  file in  readdir (gitroot; join =  true )
84+          file ==  " /home/runner/work/GraphNeuralNetworks.jl/GraphNeuralNetworks.jl/docs" &&  continue 
85+          endswith (file, " .git" &&  continue 
86+          rm (file; force =  true , recursive =  true )
87+      end 
8788
88- @info  " Copying aggregated documentation to $gitroot ." 
89- for  file in  readdir (outpath)
90-     cp (joinpath (outpath, file), joinpath (gitroot, file))
91- end 
89+      @info  " Copying aggregated documentation to $gitroot ." 
90+      for  file in  readdir (outpath)
91+          cp (joinpath (outpath, file), joinpath (gitroot, file))
92+      end 
9293
93- rm (" /home/runner/work/GraphNeuralNetworks.jl/GraphNeuralNetworks.jl/docs" =  true , recursive =  true )
94+      rm (" /home/runner/work/GraphNeuralNetworks.jl/GraphNeuralNetworks.jl/docs" =  true , recursive =  true )
9495
95- run (` git add .` 
96- if  success (` git commit -m 'Aggregate documentation'` 
97-     @info  " Pushing updated documentation." 
98-     if  has_outbranch
99-         run (` git push` 
96+     run (` git add .` 
97+     if  success (` git commit -m 'Aggregate documentation'` 
98+         @info  " Pushing updated documentation." 
99+         if  has_outbranch
100+             run (` git push` 
101+         else 
102+             run (` git push -u origin $outbranch ` 
103+         end 
104+         run (` git checkout master` 
100105    else 
101-         run ( ` git push -u origin  $outbranch ` ) 
106+         @info   " No changes to aggregated documentation. " 
102107    end 
103-     run (` git checkout master` 
104- else 
105-     @info  " No changes to aggregated documentation." 
106- end 
108+ end 
0 commit comments