Skip to content

Commit

Permalink
added documenter to gh-ci-warning conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
0815Creeper committed Sep 13, 2024
1 parent bcf86ef commit 0415057
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899"
MAT = "23992714-dd62-5051-b70f-ba57cb901cac"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb"

[compat]
julia = "1.6"
20 changes: 19 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Pkg;
Pkg.develop(path = joinpath(@__DIR__, "../../FMI.jl"));
using Documenter, Plots, JLD2, DataFrames, CSV, MAT, FMI, FMIBase, FMIImport, FMICore
using Documenter: GitHubActions
using Suppressor

example_pages = [
"Overview" => "examples/overview.md",
Expand All @@ -21,7 +22,7 @@ example_pages = [
"Pluto Workshops" => "examples/workshops.md",
]

makedocs(
my_makedocs() = makedocs(
sitename = "FMI.jl",
format = Documenter.HTML(
collapselevel = 1,
Expand Down Expand Up @@ -88,6 +89,23 @@ function deployConfig()
return GitHubActions(github_repository, github_event_name, github_ref)
end

output = ""
try
global output = @capture_err begin
my_makedocs()
end;
catch e
my_makedocs() # if it fails, re-run without capturing, so that its stderr appears in the console/logs
end

# errors = findall(r"Error:.*", output)
warns = findall(r"Warning:.*", output)

for w in warns
s = string("::warning title=Documenter-Warning::",output[w],"\r\n")
print(s)
end

deploydocs(
repo = "github.com/ThummeTo/FMI.jl.git",
devbranch = "main",
Expand Down
2 changes: 1 addition & 1 deletion src/FMI.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module FMI
# reexport
using FMIImport.FMIBase.Reexport
@reexport using FMIImport
@reexport using FMIImport.FMIBase
@reexport using FMIImport.FMIBase
@reexport using FMIImport.FMIBase.FMICore
@reexport using FMIExport

Expand Down

0 comments on commit 0415057

Please sign in to comment.