Skip to content

Commit

Permalink
Removed GitLab CI and added GitHub documentation (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
JulStraus committed Jan 26, 2024
1 parent 88780e0 commit 690d731
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 141 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Documentation
on:
push:
branches: [main]
tags: '*'
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
version: '1'
- name: Install dependencies
shell: julia --color=yes --project=docs/ {0}
run: |
using Pkg
Pkg.add(url="https://github.com/sintefore/TimeStruct.jl")
Pkg.add(url="https://github.com/EnergyModelsX/EnergyModelsBase.jl")
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()
- name: Build and deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
run: julia --color=yes --project=docs/ docs/make.jl
130 changes: 0 additions & 130 deletions .gitlab-ci.yml

This file was deleted.

3 changes: 0 additions & 3 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
EnergyModelsBase = "5d7e687e-f956-46f3-9045-6f5a5fd49f50"
EnergyModelsRenewableProducers = "b007c34f-ba52-4995-ba37-fffe79fbde35"
JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
TimeStruct = "f9ed5ce0-9f41-4eaa-96da-f38ab8df101c"
16 changes: 8 additions & 8 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ DocMeta.setdocmeta!(
recursive = true,
)

# Copy the NEWS.md file
news = "docs/src/manual/NEWS.md"
cp("NEWS.md", news; force=true)

makedocs(
modules = [EnergyModelsRenewableProducers],
sitename = "EnergyModelsRenewableProducers.jl",
repo = "https://gitlab.sintef.no/clean_export/energymodelsrenewableproducers.jl/blob/{commit}{path}#{line}",
format = Documenter.HTML(
prettyurls = get(ENV, "CI", "false") == "true",
canonical = "https://clean_export.pages.sintef.no/energymodelsrenewableproducers.jl/",
edit_link = "main",
assets = String[],
),
Expand All @@ -29,15 +31,13 @@ makedocs(
"Optimization variables"=>"manual/optimization-variables.md",
"Constraint functions"=>"manual/constraint-functions.md",
"Examples"=>"manual/simple-example.md",
"Release notes" => "manual/NEWS.md",
],
"Library" =>
Any["Public"=>"library/public.md", "Internals"=>"library/internals.md"],
],
)

# Documenter can also automatically deploy documentation to gh-pages.
# See "Hosting Documentation" and deploydocs() in the Documenter manual
# for more information.
#=deploydocs(
repo = "<repository url>"
)=#
deploydocs(;
repo = "github.com/EnergyModelsX/EnergyModelsRenewableProducers.jl.git",
)

0 comments on commit 690d731

Please sign in to comment.