Skip to content

Commit 43a8226

Browse files
authored
[docs] update to Documenter@1 (#286)
* [docs] update to Documenter@1 * Update
1 parent 93f058d commit 43a8226

File tree

3 files changed

+24
-34
lines changed

3 files changed

+24
-34
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
name: CI
22
on:
3-
- push
4-
- pull_request
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
types: [opened, synchronize, reopened]
8+
# needed to allow julia-actions/cache to delete old caches that it has created
9+
permissions:
10+
actions: write
11+
contents: read
512
jobs:
613
test:
714
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
@@ -17,21 +24,12 @@ jobs:
1724
os: windows-latest
1825
arch: x64
1926
steps:
20-
- uses: actions/checkout@v3
21-
- uses: julia-actions/setup-julia@v1
27+
- uses: actions/checkout@v4
28+
- uses: julia-actions/setup-julia@v2
2229
with:
2330
version: ${{ matrix.version }}
2431
arch: ${{ matrix.arch }}
25-
- uses: actions/cache@v3
26-
env:
27-
cache-name: cache-artifacts
28-
with:
29-
path: ~/.julia/artifacts
30-
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
31-
restore-keys: |
32-
${{ runner.os }}-test-${{ env.cache-name }}-
33-
${{ runner.os }}-test-
34-
${{ runner.os }}-
32+
- uses: julia-actions/cache@v2
3533
- uses: julia-actions/julia-buildpkg@v1
3634
- uses: julia-actions/julia-runtest@v1
3735
env:
@@ -48,23 +46,17 @@ jobs:
4846
# Fix for Plots with GR backend, see https://github.com/jheinen/GR.jl/issues/422
4947
GKSwstype: nul
5048
steps:
51-
- uses: actions/checkout@v3
52-
- uses: julia-actions/setup-julia@v1
49+
- uses: actions/checkout@v4
50+
- uses: julia-actions/setup-julia@v2
5351
with:
5452
version: '1'
55-
- shell: bash
56-
run: julia --project=docs -e "using Pkg; Pkg.develop(PackageSpec(path=pwd()))"
57-
- shell: bash
58-
run: julia --project=docs -e "using Pkg; Pkg.instantiate()"
59-
- shell: bash
60-
env:
61-
DATADEPS_ALWAYS_ACCEPT: true # For MLDatasets.MNIST
53+
- name: Install dependencies
54+
shell: julia --color=yes --project=docs/ {0}
6255
run: |
63-
julia --project=docs -e '
64-
using Documenter: doctest
65-
using DiffOpt
66-
doctest(DiffOpt)'
67-
- run: julia --project=docs docs/make.jl
56+
using Pkg
57+
Pkg.develop(PackageSpec(path=pwd()))
58+
Pkg.instantiate()
59+
- run: julia --project=docs --color=yes docs/make.jl
6860
env:
6961
DATADEPS_ALWAYS_ACCEPT: true # For MLDatasets.MNIST
7062
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

docs/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
1515
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1616

1717
[compat]
18-
Documenter = "0.27"
18+
Documenter = "1"

docs/make.jl

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ end
4343
literate_directory(_EXAMPLE_DIR)
4444

4545
makedocs(;
46+
authors = "JuMP Community",
47+
sitename = "DiffOpt.jl",
48+
repo = "https://github.com/jump-dev/DiffOpt.jl",
4649
modules = [DiffOpt],
47-
doctest = false,
4850
clean = true,
4951
format = Documenter.HTML(;
5052
prettyurls = get(ENV, "CI", nothing) == "true",
@@ -61,10 +63,6 @@ makedocs(;
6163
f in readdir(_EXAMPLE_DIR) if endswith(f, ".md")
6264
],
6365
],
64-
strict = true, # See https://github.com/JuliaOpt/JuMP.jl/issues/1576
65-
repo = "https://github.com/jump-dev/DiffOpt.jl",
66-
sitename = "DiffOpt.jl",
67-
authors = "JuMP Community",
6866
)
6967

7068
deploydocs(; repo = "github.com/jump-dev/DiffOpt.jl.git", push_preview = true)

0 commit comments

Comments
 (0)