Skip to content

Commit a0facd9

Browse files
Merge pull request #240 from ArnoStrouwen/cleanup
doc cleanup prototype
2 parents b91b2bc + 2a32885 commit a0facd9

File tree

2 files changed

+28
-3
lines changed

2 files changed

+28
-3
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: DocsPreviewCleanup
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
7+
jobs:
8+
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+
- name: Delete preview and history + push changes
16+
run: |
17+
if [ -d "previews/PR$PRNUM" ]; then
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+
git push --force origin gh-pages-new:gh-pages
24+
fi
25+
env:
26+
PRNUM: ${{ github.event.number }}

docs/make.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@ makedocs(sitename = "LinearSolve.jl",
2020
# Other available options are
2121
# :autodocs_block, :cross_references, :docs_block, :eval_block, :example_block, :footnote, :meta_block, :missing_docs, :setup_block
2222
],
23-
format = Documenter.HTML(analytics = "UA-90474609-3",
24-
assets = ["assets/favicon.ico"],
23+
format = Documenter.HTML(assets = ["assets/favicon.ico"],
2524
canonical = "https://docs.sciml.ai/LinearSolve/stable/"),
2625
pages = pages)
2726

2827
deploydocs(;
2928
repo = "github.com/SciML/LinearSolve.jl",
30-
devbranch = "main")
29+
push_preview = true)

0 commit comments

Comments
 (0)