@@ -53,67 +53,17 @@ jobs:
5353 runs-on : ubuntu-latest
5454 steps :
5555 - uses : actions/checkout@v2
56- - uses : julia-actions/setup-julia@v1
56+ - uses : julia-actions/setup-julia@v2
5757 with :
5858 version : ' 1'
59- - run : |
60- julia -e '
61- function set_environment_variable(name::AbstractString, value::AbstractString)
62- github_env = ENV["GITHUB_ENV"]
63- touch(github_env)
64- open(github_env, "a") do io
65- println(io, "$(name)=$(value)")
66- end
67- end
68- event_name = "${{ github.event_name }}"
69- if event_name == "pull_request"
70- base_ref = "${{ github.base_ref }}"
71- head_ref = "${{ github.head_ref }}"
72- base_repository = "${{ github.repository }}"
73- head_repository = "${{ github.event.pull_request.head.repo.full_name }}"
74- build_docs = (base_ref == "master") && (head_ref == "dev") && (base_repository == head_repository)
75- elseif event_name == "push"
76- ref = "${{ github.ref }}"
77- build_docs = (ref == "refs/heads/master") || (startswith(ref, "refs/tags/"))
78- elseif event_name == "schedule"
79- build_docs = ref == "refs/heads/master"
80- elseif event_name == "workflow_dispatch"
81- build_docs = ref == "refs/heads/master"
82- else
83- build_docs = false
84- end
85- if build_docs
86- @info("We will build the docs")
87- set_environment_variable("BUILD_DOCS", "true")
88- else
89- @info("We will NOT build the docs")
90- set_environment_variable("BUILD_DOCS", "false")
91- end'
92- - run : |
93- julia --project=docs -e '
94- if ENV["BUILD_DOCS"] == "true"
95- using Pkg
96- Pkg.develop(PackageSpec(path=pwd()))
97- Pkg.instantiate()
98- end'
99- - run : |
100- julia --project=docs -e '
101- if ENV["BUILD_DOCS"] == "true"
102- using Documenter: doctest
103- using OpenML
104- @info "attempting to run the doctests"
105- doctest(OpenML)
106- else
107- @info "skipping the doctests"
108- end'
109- - run : julia --project=docs -e '
110- if ENV["BUILD_DOCS"] == "true"
111- @info "attempting to build the docs"
112- run(`julia --project=docs docs/make.jl`)
113- @info "successfully built the docs"
114- else
115- @info "skipping the docs build"
116- end'
59+ - uses : julia-actions/julia-buildpkg@latest
60+ - uses : julia-actions/julia-docdeploy@latest
11761 env :
11862 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
11963 DOCUMENTER_KEY : ${{ secrets.DOCUMENTER_KEY }}
64+ - run : |
65+ julia --project=docs -e '
66+ using Documenter: DocMeta, doctest
67+ using OpenML
68+ DocMeta.setdocmeta!(OpenML, :DocTestSetup, :(using OpenML); recursive=true)
69+ doctest(OpenML)'
0 commit comments