Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/julia-actions/setu…
Browse files Browse the repository at this point in the history
…p-julia-2
  • Loading branch information
oameye authored Apr 10, 2024
2 parents ab169cf + 89f8197 commit bf6135b
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .github/workflows/doc-preview-cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Doc Preview Cleanup

on:
pull_request:
types: [closed]

# Ensure that only one "Doc Preview Cleanup" workflow is force pushing at a time
concurrency:
group: doc-preview-cleanup
cancel-in-progress: false

jobs:
doc-preview-cleanup:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout gh-pages branch
uses: actions/checkout@v4
with:
ref: gh-pages
- name: Delete preview and history + push changes
run: |
if [ -d "${preview_dir}" ]; then
git config user.name "Documenter.jl"
git config user.email "[email protected]"
git rm -rf "${preview_dir}"
git commit -m "delete preview"
git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree})
git push --force origin gh-pages-new:gh-pages
fi
env:
preview_dir: previews/PR${{ github.event.number }}
4 changes: 3 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ makedocs(;
modules=[CriticalTransitions],
doctest=false,
format = Documenter.HTML(
canonical="https://juliadynamics.github.io/CriticalTransitions.jl/",
prettyurls = get(ENV, "CI", nothing) == "true",
mathengine = Documenter.MathJax2()
),
Expand All @@ -34,9 +35,10 @@ makedocs(;
"Predefined systems" => "man/systems.md",
"Development stage" => "man/dev.md"
],
plugins=[bib],
plugins=[bib]
)

deploydocs(
repo = "github.com/juliadynamics/CriticalTransitions.jl.git",
push_preview = false
)

0 comments on commit bf6135b

Please sign in to comment.