Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/doc-preview-cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
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
# This workflow pushes to gh-pages; permissions are per-job and independent of docs.yml
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 "documenter@juliadocs.github.io"
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 }}
7 changes: 4 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Contributing

Community driven development of this package is encouraged. To maintain code quality standards, please adhere to the following guidlines when contributing:
- To get started, <a href="https://www.clahub.com/agreements/NREL/SIIP-PACKAGE.jl">sign the Contributor License Agreement</a>.
- Please do your best to adhere to our [coding style guide](docs/src/developer/style.md).
- To submit code contributions, [fork](https://help.github.com/articles/fork-a-repo/) the repository, commit your changes, and [submit a pull request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/).

- To get started, <a href="https://www.clahub.com/agreements/NREL/SIIP-PACKAGE.jl">sign the Contributor License Agreement</a>.
- Please do your best to adhere to our [coding style guide](docs/src/developer/style.md).
- To submit code contributions, [fork](https://help.github.com/articles/fork-a-repo/) the repository, commit your changes, and [submit a pull request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/).
6 changes: 5 additions & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
[deps]
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterInterLinks = "d12716ef-a0f6-4df4-a9f1-a5a34e75c656"
DocumenterTools = "35a29f4d-8980-5a13-9543-d66fff28ecb8"
HybridSystemsSimulations = "bed98974-b02a-5e2f-9ee0-a103f5c450dd"
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d"

[compat]
Documenter = "0.27"
Documenter = "1.0"
julia = "^1.6"
62 changes: 40 additions & 22 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,31 +1,49 @@
using Documenter, HybridSystemsSimulations
import DataStructures: OrderedDict
using Documenter
using HybridSystemsSimulations
using DataStructures
using DocumenterInterLinks
using Literate

const _DOCS_BASE_URL = "https://nrel-sienna.github.io/HybridSystemsSimulations.jl/stable"

links = InterLinks(
"Julia" => "https://docs.julialang.org/en/v1/",
"InfrastructureSystems" => "https://nrel-sienna.github.io/InfrastructureSystems.jl/stable/",
"PowerSystems" => "https://nrel-sienna.github.io/PowerSystems.jl/stable/",
"PowerSimulations" => "https://nrel-sienna.github.io/PowerSimulations.jl/stable/",
)

include(joinpath(@__DIR__, "make_tutorials.jl"))
make_tutorials()

pages = OrderedDict(
"Welcome Page" => "index.md",
"Quick Start Guide" => "quick_start_guide.md",
"Tutorials" => "tutorials/intro_page.md",
"Public API Reference" => "api/public.md",
"Internal API Reference" => "api/internal.md",
"Tutorials" => Any[],
"Reference" => Any[
"Public API" => "api/public.md",
"Internals" => "api/internal.md",
],
)

makedocs(
modules=[HybridSystemsSimulations],
format=Documenter.HTML(;
mathengine=Documenter.MathJax(),
prettyurls=haskey(ENV, "GITHUB_ACTIONS"),
makedocs(;
modules = [HybridSystemsSimulations],
format = Documenter.HTML(;
mathengine = Documenter.MathJax(),
prettyurls = haskey(ENV, "GITHUB_ACTIONS"),
size_threshold = nothing,
),
sitename="HybridSystemsSimulations.jl",
authors="Jose Daniel Lara, Rodrigo Henriquez-Auba",
pages=Any[p for p in pages],
sitename = "HybridSystemsSimulations.jl",
authors = "Jose Daniel Lara, Rodrigo Henriquez-Auba",
pages = Any[p for p in pages],
plugins = [links],
)

deploydocs(
repo="github.com/NREL-Sienna/HybridSystemsSimulations.jl.git",
target="build",
branch="gh-pages",
devbranch="main",
devurl="dev",
push_preview=true,
versions=["stable" => "v^", "v#.#"],
deploydocs(;
repo = "github.com/NREL-Sienna/HybridSystemsSimulations.jl.git",
target = "build",
branch = "gh-pages",
devbranch = "main",
devurl = "dev",
push_preview = true,
versions = ["stable" => "v^", "v#.#"],
)
Loading
Loading