From 5eec8f83f5125939e28fd938f8180acf89e48833 Mon Sep 17 00:00:00 2001 From: divital-coder Date: Sun, 5 Jan 2025 16:40:15 +0530 Subject: [PATCH] Documentation setup --- .github/workflows/docx.yml | 24 ++++++++++++++++++++++++ docs/make.jl | 28 +++++++++++++++------------- 2 files changed, 39 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/docx.yml diff --git a/.github/workflows/docx.yml b/.github/workflows/docx.yml new file mode 100644 index 0000000..86f4123 --- /dev/null +++ b/.github/workflows/docx.yml @@ -0,0 +1,24 @@ +name: Documenter + +on: + push: + branches: + - main + tags: + - '*' + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: julia-actions/setup-julia@v1 + with: + version: '1.10' # Use the appropriate Julia version + - name: Install dependencies + run: julia --project=docs -e 'using Pkg; Pkg.instantiate()' + - name: Build and deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub automatically provides this + run: julia --project=docs docs/make.jl \ No newline at end of file diff --git a/docs/make.jl b/docs/make.jl index b702e53..726cf03 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -4,23 +4,25 @@ using DocumenterVitepress DocMeta.setdocmeta!(MedImages, :DocTestSetup, :(using MedImages); recursive=true) -makedocs(; - modules=[MedImages], - repo=Remotes.GitHub("JuliaHealth", "MedImage.jl"), - authors="Jakub-Mitura , Divyansh-Goyal and contributors", - sitename="MedImages.jl", - format=DocumenterVitepress.MarkdownVitepress( - repo="https://github.com/JuliaHealth/MedImages.jl", - ), - pages=[ - "Home" => "index.md", +pgs = [ "Home" => "index.md", "Tutorials" => "tutorials.md", "Contributing" => "contributing.md" - ], -) + ] + +fmt = DocumenterVitepress.MarkdownVitepress( + repo = "https://github.com/Juliahealth/MedImages.jl",) + +makedocs(; + modules=[MedImages], + repo=Remotes.GitHub("JuliaHealth", "MedImages.jl"), + authors="Jakub-Mitura , Divyansh-Goyal , Jan-Zubik and contributors", + sitename="MedImages.jl", + format=fmt, + pages=pgs + ) deploydocs(; - repo="github.com/JuliaHealth/MedImage.jl", + repo="github.com/JuliaHealth/MedImages.jl", target="build", # this is where Vitepress stores its output devbranch="main", branch="gh-pages",