Skip to content

Commit

Permalink
Add documentation deploy & Update Documenter.jl version (#161)
Browse files Browse the repository at this point in the history
* Add docdeploy

* Update Documenter.jl version

* Update .gitignore
  • Loading branch information
eliascarv authored Apr 24, 2023
1 parent 7f55b17 commit e156576
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 10 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,22 @@ jobs:
- uses: codecov/codecov-action@v3
with:
file: lcov.info
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-docdeploy@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
- run: |
julia --project=docs -e '
using Documenter: DocMeta, doctest
using LossFunctions
DocMeta.setdocmeta!(LossFunctions, :DocTestSetup, :(using LossFunctions); recursive=true)
doctest(LossFunctions)'
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
*.jl.*.cov
*.jl.mem
Manifest.toml
docs/build/
.vscode
.DS_Store
2 changes: 0 additions & 2 deletions docs/.gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
LossFunctions = "30fc2ffe-d236-52d8-8643-a9d8f7c094a7"

[compat]
Documenter = "0.23"
Documenter = "0.27"
24 changes: 17 additions & 7 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
using Documenter, LossFunctions

istravis = "TRAVIS" keys(ENV)
DocMeta.setdocmeta!(LossFunctions, :DocTestSetup, :(using LossFunctions); recursive=true)

makedocs(
format = Documenter.HTML(assets=["assets/style.css","assets/favicon.ico"], prettyurls=istravis),
sitename = "LossFunctions.jl",
authors = "Christof Stocker, Tom Breloff, Alex Williams",
pages = [
modules=[LossFunctions],
authors="Christof Stocker, Tom Breloff, Alex Williams",
repo="https://github.com/JuliaML/LossFunctions.jl/blob/{commit}{path}#{line}",
sitename="LossFunctions.jl",
format=Documenter.HTML(
prettyurls=get(ENV, "CI", "false") == "true",
canonical="https://JuliaML.github.io/LossFunctions.jl",
assets=["assets/style.css", "assets/favicon.ico"]
),
pages=[
hide("Home" => "index.md"),
"Introduction" => [
"introduction/gettingstarted.md",
Expand All @@ -28,7 +34,11 @@ makedocs(
hide("Indices" => "indices.md"),
"acknowledgements.md",
"LICENSE.md",
],
]
)

deploydocs(repo="github.com/JuliaML/LossFunctions.jl.git")
deploydocs(
repo="github.com/JuliaML/LossFunctions.jl.git",
devbranch="master",
push_preview=true
)

0 comments on commit e156576

Please sign in to comment.