Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs deploy #6

Merged
merged 3 commits into from
May 17, 2024
Merged
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
33 changes: 33 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Documentation

on:
push:
branches:
- main
pull_request:
branches:
- main

concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}


jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: '1.10'
- uses: julia-actions/cache@v1
- name: Install dependencies
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- name: Build and deploy
env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key
run: julia --project=docs/ docs/make.jl
7 changes: 7 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[deps]
BeforeIT = "ca9fcad7-41d0-4f76-b1e5-366c28bce52e"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
StatsPlots = "f3b207a7-027a-5e70-b257-86293d7955fd"
17 changes: 3 additions & 14 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@

# Inside make.jl
push!(LOAD_PATH, "../src/")
include("../src/BeforeIT.jl")

# using Pkg
# pkg"activate .."

cd(@__DIR__)
println("Loading packages...")
using .BeforeIT
using BeforeIT
using Documenter
using Literate

Expand Down Expand Up @@ -35,7 +28,6 @@ Literate.markdown(joinpath(indir, "get_parameters_and_initial_conditions.jl"), o
Literate.markdown(joinpath(indir, "multithreading_speedup.jl"), outdir; credit = false)
Literate.markdown(joinpath(indir, "scenario_analysis_via_overload.jl"), outdir; credit = false)
Literate.markdown(joinpath(indir, "change_expectations.jl"), outdir; credit = false)
# Literate.markdown(joinpath(indir, "parallel_evaluations.jl"), outdir; credit = false)


println("Documentation Build")
Expand All @@ -55,7 +47,4 @@ makedocs(
],
)

# deploydocs(
# repo = "github.com/bancaditalia/BeforeIT.jl.git",
# devbranch = "main"
# )
deploydocs(;repo = "github.com/bancaditalia/BeforeIT.jl.git", devbranch = "main", target = "gh-pages")
Loading