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

Deployed docs not rendering anything correctly #183

Closed
70Gage70 opened this issue Oct 5, 2024 · 5 comments
Closed

Deployed docs not rendering anything correctly #183

70Gage70 opened this issue Oct 5, 2024 · 5 comments

Comments

@70Gage70
Copy link

70Gage70 commented Oct 5, 2024

Building locally with DocumenterVitepress.dev_docs("build", md_output_path = "") looks good

Image

But deploying to github gives this (also, none of the links work):

Image

See the live site here. I'm honestly stumped on this, I've tried to copy themake.jl and documentation.yaml as closely as possible but nothing seems to be working.

My make.jl
using Documenter, DocumenterVitepress
using Sargassum
using CairoMakie

# try
#     itps_load(Sargassum.SargassumBOMB._ITPS_SCRATCH.x)
# catch
#     try 
#         itps_default_construct(download = true)
#     catch
#         nothing
#     end
# end

### VITEPRESS
makedocs(
    sitename = "Sargassum.jl",
    format = MarkdownVitepress(
        # md_output_path = ".", # LOCAL ONLY
        # build_vitepress = false, # LOCAL ONLY
        repo = "github.com/70Gage70/Sargassum.jl",
        devbranch = "master", 
        devurl = "dev";
    ),
    modules = [Sargassum],
    warnonly = true,
    checkdocs=:all,
    draft=false,
    source="src", 
    build="build",
    # clean = false, # LOCAL ONLY
)

### DOCUMENTER
# makedocs(
#     sitename = "Sargassum.jl",
#     format = Documenter.HTML(),
#     modules = [Sargassum, SargassumBOMB, SargassumColors, SargassumFromAFAI, SargassumInterface],
#     pages = [
#         "Home" => "index.md",
#         "Getting Started" => "getting-started.md",
#         "Packages" => [
#             "SargassumInterface.jl" => [
#                 "Tutorial" => "s-interface.md",
#                 "API" => "s-interface-api.md"],
#             "SargassumBOMB.jl" => [
#                 "Tutorial" => "s-bomb.md",
#                 "API" => "s-bomb-api.md",
#                 "Examples API" => "s-bomb-examples-api.md"],
#             "SargassumFromAFAI.jl" => [
#                 "Tutorial" => "s-afai.md",
#                 "API" => "s-afai-api.md"],
#             "SargassumColors.jl" => [
#                 "Tutorial" => "s-colors.md",
#                 "API" => "s-colors-api.md"],
#         ]
#     ],
#     warnonly = true
# )

deploydocs(;
    repo = "github.com/70Gage70/Sargassum.jl",
    target = "build", 
    versions = nothing,
    branch = "gh-pages",
    devbranch = "master",
    push_preview = true
)
My documentation.yaml
name: Documentation

on:
  push:
    branches:
      - main
      - master
    tags: ['*']
  pull_request:

  workflow_dispatch:

permissions:
  contents: write
  pages: write
  id-token: write
  actions: write

concurrency:
  group: pages
  cancel-in-progress: false

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Setup Julia
        uses: julia-actions/setup-julia@v1
      - name: Pull Julia cache
        uses: julia-actions/cache@v1
      - name: Install dependencies
        run: julia --project=docs -e 'using Pkg; Pkg.Registry.add("General"); Pkg.Registry.add(Pkg.RegistrySpec(url = "https://github.com/70Gage70/SargassumRegistry")); Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate(); using Sargassum; itps_default_construct(download = true)'
      - name: Build and deploy docs
        uses: julia-actions/julia-docdeploy@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
          DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
          GKSwstype: "100" # for Plots.jl plots (if you have them)
          JULIA_DEBUG: "Documenter"
          DATADEPS_ALWAYS_ACCEPT: true

The full repo is here.

It's strange because e.g. here we can see that the build is doing the right things (making the figures in @example blocks) but somehow the site itself is just broken.

EDIT: Copied wrong version of make.jl.

@asinghvi17
Copy link
Collaborator

You are passing build_vitepress=false to make.jl, if you delete that line it should work.

@70Gage70
Copy link
Author

70Gage70 commented Oct 6, 2024

@asinghvi17 Sorry, I copied it wrong, I comment that link out in the live version. See here for my exact make.jl.

@asinghvi17
Copy link
Collaborator

Hmm, you might need an https:// prefix to repo then

@70Gage70
Copy link
Author

70Gage70 commented Oct 6, 2024

@asinghvi17 Thanks for the suggestion, unfortunately it didn't seem to work, new make.jl, live site.

@70Gage70
Copy link
Author

70Gage70 commented Oct 6, 2024

Apparently it works now, absolutely no clue what fixed it. I copied the make.jl of DimensionalData.jl exactly in this latest iteration. Maybe versions = nothing was the issue?

make.jl
using Documenter, DocumenterVitepress
using Sargassum
using CairoMakie

### VITEPRESS
makedocs(;
    sitename = "Sargassum.jl",
    authors = "Gage Bonner",
    modules = [Sargassum],
    checkdocs=:all,
    format = DocumenterVitepress.MarkdownVitepress(
        repo = "https://github.com/70Gage70/Sargassum.jl",
        # md_output_path = ".", # LOCAL ONLY
        # build_vitepress = false, # LOCAL ONLY
        devbranch = "master", 
        devurl = "dev";
    ),
    draft = false,
    source = "src", 
    build = "build",
    warnonly = true,
    # clean = true, # LOCAL ONLY
)

deploydocs(;
    repo = "https://github.com/70Gage70/Sargassum.jl",
    target = "build", 
    # versions = nothing,
    branch = "gh-pages",
    devbranch = "master",
    push_preview = true
)

@70Gage70 70Gage70 closed this as completed Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants