Skip to content

Commit

Permalink
Enable Documenter preview for PRs (#63)
Browse files Browse the repository at this point in the history
* push preview

* add some more badges

* remove duplicate docs

* Change badge order

---------

Co-authored-by: Michael Ingold <[email protected]>
  • Loading branch information
JoshuaLampert and mikeingold authored Sep 5, 2024
1 parent 450cc1d commit b1c4bfb
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 21 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/DocPreviewCleanup.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 }}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# MeshIntegrals.jl

[![Docs-stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://mikeingold.github.io/MeshIntegrals.jl/stable/)
[![Docs-dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://mikeingold.github.io/MeshIntegrals.jl/dev/)
[![License: MIT](https://img.shields.io/badge/License-MIT-success.svg)](https://opensource.org/licenses/MIT)
[![ColPrac](https://img.shields.io/badge/ColPrac-Contributor's%20Guide-blueviolet?style=flat-square)](https://github.com/SciML/ColPrac)

Expand Down
5 changes: 3 additions & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ makedocs(
"Home" => [
"About" => "index.md",
"Support Matrix" => "supportmatrix.md",
"Integration Algorithms" => "algorithms.md",
"Example Usage" => "usage.md"
],
"Derivations" => [
Expand All @@ -17,4 +16,6 @@ makedocs(
]
)

deploydocs(repo = "github.com/mikeingold/MeshIntegrals.jl.git")
deploydocs(repo = "github.com/mikeingold/MeshIntegrals.jl.git",
devbranch = "main",
push_preview = true)
19 changes: 0 additions & 19 deletions docs/src/algorithms.md

This file was deleted.

10 changes: 10 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
# MeshIntegrals.jl

[![Docs-stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://mikeingold.github.io/MeshIntegrals.jl/stable/)
[![Docs-dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://mikeingold.github.io/MeshIntegrals.jl/dev/)
[![License: MIT](https://img.shields.io/badge/License-MIT-success.svg)](https://opensource.org/licenses/MIT)
[![ColPrac](https://img.shields.io/badge/ColPrac-Contributor's%20Guide-blueviolet?style=flat-square)](https://github.com/SciML/ColPrac)

[![Build Status](https://github.com/mikeingold/MeshIntegrals.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/mikeingold/MeshIntegrals.jl/actions/workflows/CI.yml?query=branch%3Amain)
[![codecov](https://codecov.io/gh/mikeingold/MeshIntegrals.jl/graph/badge.svg)](https://codecov.io/gh/mikeingold/MeshIntegrals.jl)
[![Coveralls](https://coveralls.io/repos/github/mikeingold/MeshIntegrals.jl/badge.svg?branch=main)](https://coveralls.io/github/mikeingold/MeshIntegrals.jl?branch=main)
[![Aqua QA](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)

**MeshIntegrals.jl** is a Julia library that leverages differential forms to implement fast
and easy numerical integration of field equations over geometric domains.

0 comments on commit b1c4bfb

Please sign in to comment.