Skip to content

Commit 6930a12

Browse files
committed
Docs: Setup to deploy site on github page
1 parent 4150317 commit 6930a12

File tree

4 files changed

+35
-14
lines changed

4 files changed

+35
-14
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags: '*'
8+
pull_request:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: julia-actions/setup-julia@latest
16+
with:
17+
version: 1.3
18+
- name: Install dependencies
19+
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
20+
- name: Build and deploy
21+
env:
22+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
23+
run: julia --project=docs/ docs/make.jl

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
*.gif
22
Manifest.toml
3+
docs/build/
4+
docs/site/

docs/make.jl

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,35 +25,36 @@ for data in ("logo" => "black", "logo-dark" => "white")
2525
println("Sucessfully created asset: $(data.first).")
2626
end
2727
end
28+
2829
# Turn logo into icon
2930
if !isfile(joinpath(assets_dir, "favicon.ico")) && isfile(joinpath(assets_dir, "logo.svg"))
3031
run(`convert -background none $(joinpath(assets_dir, "logo.svg")) -define icon:auto-resize $(joinpath(assets_dir, "favicon.ico"))`)
3132
println("Sucessfully created asset: ico.")
3233
end
34+
35+
# Set the right metadata for doctests
3336
DocMeta.setdocmeta!(DeformableBodies, :DocTestSetup, :(using DeformableBodies); recursive=true)
3437

3538
makedocs(
3639
sitename = "DeformableBodies.jl",
3740
authors = "Iago Leal de Freitas",
3841
format = Documenter.HTML(
39-
prettyurls = get(ENV, "CI", nothing) == "true",
40-
assets = ["assets/favicon.ico"]
42+
prettyurls = !("local" in ARGS), # Deactivate on local builds
43+
assets = ["assets/favicon.ico"],
44+
canonical = "https://iagoleal.github.io/DeformableBodies.jl/dev/"
4145
),
4246
modules = [DeformableBodies, DeformableBodies.Quaternions],
4347
pages = [
4448
"Introduction" => "index.md",
4549
"Tutorial" => "tutorial-cubecopter.md",
46-
"theory.md",
4750
"Reference" => [
4851
"Quaternions" => "ref-quaternions.md",
4952
"DeformableBodies" => "ref-models.md"
5053
]
5154
]
5255
)
5356

54-
# Documenter can also automatically deploy documentation to gh-pages.
55-
# See "Hosting Documentation" and deploydocs() in the Documenter manual
56-
# for more information.
57-
#=deploydocs(
58-
repo = "<repository url>"
59-
)=#
57+
# Deploy site to Github Pages
58+
deploydocs(
59+
repo = "github.com/iagoleal/DeformableBodies.jl.git",
60+
)

docs/src/theory.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)