Skip to content

Commit

Permalink
Merge pull request #36 from JuliaReach/schillic/format
Browse files Browse the repository at this point in the history
Auto-format script
  • Loading branch information
schillic committed Jun 24, 2023
2 parents 4650239 + 1ebd0a5 commit 0cd8968
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 16 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Format
on:
schedule:
- cron: '0 0 * * 6' # every Saturday at 0:00
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install JuliaFormatter and format
run: |
julia -e 'import Pkg; Pkg.add("JuliaFormatter")'
julia -e 'using JuliaFormatter; format(".")'
# https://github.com/marketplace/actions/create-pull-request
# https://github.com/peter-evans/create-pull-request#reference-example
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Format .jl files
title: 'Automatic JuliaFormatter.jl run'
branch: auto-juliaformatter-pr
delete-branch: true
- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
25 changes: 9 additions & 16 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,13 @@ import LazySets
DocMeta.setdocmeta!(MathematicalPredicates, :DocTestSetup,
:(using MathematicalPredicates); recursive=true)

makedocs(
sitename = "MathematicalPredicates.jl",
modules = [MathematicalPredicates],
format = Documenter.HTML(
prettyurls = get(ENV, "CI", nothing) == "true",
assets = ["assets/aligned.css"]),
pages = [
"Home" => "index.md",
"About" => "about.md"
],
strict = true
)
makedocs(; sitename="MathematicalPredicates.jl",
modules=[MathematicalPredicates],
format=Documenter.HTML(; prettyurls=get(ENV, "CI", nothing) == "true",
assets=["assets/aligned.css"]),
pages=["Home" => "index.md",
"About" => "about.md"],
strict=true)

deploydocs(
repo = "github.com/JuliaReach/MathematicalPredicates.jl.git",
push_preview = true
)
deploydocs(; repo="github.com/JuliaReach/MathematicalPredicates.jl.git",
push_preview=true)

0 comments on commit 0cd8968

Please sign in to comment.