Skip to content

Commit 9ba1d6a

Browse files
authored
Preview of docs (#214)
1 parent d6eab2b commit 9ba1d6a

File tree

2 files changed

+30
-6
lines changed

2 files changed

+30
-6
lines changed
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+
steps:
11+
- name: Checkout gh-pages branch
12+
uses: actions/checkout@v2
13+
with:
14+
ref: gh-pages
15+
16+
- name: Delete preview and history
17+
run: |
18+
git config user.name "Documenter.jl"
19+
git config user.email "[email protected]"
20+
git rm -rf "previews/PR$PRNUM"
21+
git commit -m "delete preview"
22+
git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree})
23+
env:
24+
PRNUM: ${{ github.event.number }}
25+
26+
- name: Push changes
27+
run: |
28+
git push --force origin gh-pages-new:gh-pages

docs/make.jl

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,7 @@ makedocs(
2323
"API"=>"api.md"]
2424
)
2525

26-
# Documenter can also automatically deploy documentation to gh-pages.
27-
# See "Hosting Documentation" and deploydocs() in the Documenter manual
28-
# for more information.
29-
deploydocs(
30-
deps = Deps.pip("mkdocs", "python-markdown-math"),
26+
deploydocs(;
3127
repo = "github.com/JuliaGaussianProcesses/KernelFunctions.jl.git",
32-
target = "build"
28+
push_preview = true,
3329
)

0 commit comments

Comments
 (0)