Skip to content

Commit

Permalink
Setup docs (#134)
Browse files Browse the repository at this point in the history
* docs folder

* remove deps

* documentar .yaml
  • Loading branch information
albert-de-montserrat authored Apr 24, 2024
1 parent 04ac372 commit 8a5aefc
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/Documenter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Note: this workflow is copied from the Trixi.jl package
name: Documentation
on:
push:
branches:
- 'main'
tags: '*'
paths-ignore:
- '.zenodo.json'
- '.github/workflows/SpellCheck.yml'
- '.github/workflows/UnitTests.yml'
- '.github/workflows/TagBot.yml'
pull_request:
paths-ignore:
- '.github/workflows/SpellCheck.yml'
- '.github/workflows/UnitTests.yml'
- '.github/workflows/TagBot.yml'
workflow_dispatch:

# Cancel redundant CI tests automatically
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
permissions:
contents: write
pull-requests: read
statuses: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: '1.9'
- 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
5 changes: 5 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"

[compat]
Documenter = "1.2.1"
16 changes: 16 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using Documenter, JustRelax
push!(LOAD_PATH, "../src/")

@info "Making documentation..."
makedocs(;
sitename="JustRelax.jl",
authors="Albert de Montserrat and contributors",
modules=[JustRelax],
format=Documenter.HTML(; prettyurls=get(ENV, "CI", nothing) == "true"), # easier local build
warnonly = Documenter.except(:footnote),
pages=[
"Home" => "index.md",
],
)

deploydocs(; repo="github.com/JuliaGeodynamics/JustPIC.jl", devbranch="main")
3 changes: 3 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# JustRelax.jl

Multi-XPU stokes solver for geodynamic modelling.

0 comments on commit 8a5aefc

Please sign in to comment.