Skip to content

Commit 84d1bd7

Browse files
JaimeRZPdevmotion
andauthored
Documenter (#85)
* 0.7.5 * documenter * Apply suggestions from code review Co-authored-by: David Widmann <[email protected]> * docs wip * Apply suggestions from code review Co-authored-by: David Widmann <[email protected]> * DocCleapup --------- Co-authored-by: David Widmann <[email protected]>
1 parent 2ff8f13 commit 84d1bd7

File tree

7 files changed

+90
-0
lines changed

7 files changed

+90
-0
lines changed

.github/workflows/DocCleanup.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Doc Preview Cleanup
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
7+
jobs:
8+
doc-preview-cleanup:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
steps:
13+
- name: Checkout gh-pages branch
14+
uses: actions/checkout@v3
15+
with:
16+
ref: gh-pages
17+
- name: Delete preview and history + push changes
18+
run: |
19+
if [ -d "previews/PR$PRNUM" ]; then
20+
git config user.name "Documenter.jl"
21+
git config user.email "[email protected]"
22+
git rm -rf "previews/PR$PRNUM"
23+
git commit -m "delete preview"
24+
git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree})
25+
git push --force origin gh-pages-new:gh-pages
26+
fi
27+
env:
28+
PRNUM: ${{ github.event.number }}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags: '*'
8+
pull_request:
9+
10+
jobs:
11+
build:
12+
permissions:
13+
contents: write
14+
statuses: write
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
- uses: julia-actions/setup-julia@v1
19+
with:
20+
version: 1
21+
- name: Install dependencies
22+
run: julia --project=docs/ -e '
23+
using Pkg;
24+
Pkg.develop(PackageSpec(path=pwd()));
25+
Pkg.instantiate()'
26+
- name: Build and deploy
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
run: julia --project=docs/ docs/make.jl
30+

docs/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build/

docs/Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[deps]
2+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"

docs/make.jl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using Pkg
2+
3+
using Documenter
4+
using AdvancedMH
5+
6+
# cp(joinpath(@__DIR__, "../README.md"), joinpath(@__DIR__, "src/index.md"))
7+
8+
makedocs(sitename = "AdvancedMH", format = Documenter.HTML(), modules = [AdvancedMH])
9+
10+
deploydocs(
11+
repo = "github.com/TuringLang/AdvancedMH.jl.git",
12+
push_preview = true, # allow PR to deploy
13+
)

docs/src/api.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# AdvancedMH.jl
2+
3+
Documentation for AdvancedMH.jl
4+
5+
6+
## Structs
7+
```@docs
8+
MetropolisHastings
9+
```
10+
11+
## Functions
12+
```@docs
13+
StaticMH
14+
RWMH
15+
```

docs/src/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../README.md

0 commit comments

Comments
 (0)