Skip to content

Commit

Permalink
Enable documentation for package (#50)
Browse files Browse the repository at this point in the history
* Start

* Fix error
  • Loading branch information
huiyuxie authored Sep 20, 2024
1 parent 9f0c935 commit 76cc918
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Documentation
on:
push:
branches:
- main # update to match your development branch (master, main, dev, trunk, ...)
tags: "*"
pull_request:

jobs:
build:
permissions:
actions: write
contents: write
pull-requests: read
statuses: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: "1"
- uses: julia-actions/cache@v2
- 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
**/Manifest.toml
out*/
docs/build

.DS_Store

Expand Down
2 changes: 1 addition & 1 deletion .typos.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[files]
extend-exclude = [
"docs/dev_env_info.md"
"docs/src/dev_env_info.md"
]
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"

[extras]
Trixi = "a7f1ee26-1774-49b1-8366-f1abc58fbfcb"
17 changes: 17 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# TrixiCUDA.jl is not accessible through Julia's LOAD_PATH currently
push!(LOAD_PATH, "../src/")

using Documenter
using TrixiCUDA

# DocMeta.setdocmeta!(TrixiCUDA, :DocTestSetup, :(using TrixiCUDA); recursive = true)

makedocs(sitename = "TrixiCUDA.jl",
# pages = [
# "Home" => "index.md"
# ],
format = Documenter.HTML(prettyurls = get(ENV, "CI", nothing) == "true"))

deploydocs(repo = "github.com/trixi-gpu/TrixiCUDA.jl",
devbranch = "main",
push_preview = true)
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# TrixiCUDA.jl
File renamed without changes.

0 comments on commit 76cc918

Please sign in to comment.