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

Cannot generate docs for multiple targets? #213

Closed
navanchauhan opened this issue Dec 17, 2023 · 2 comments
Closed

Cannot generate docs for multiple targets? #213

navanchauhan opened this issue Dec 17, 2023 · 2 comments

Comments

@navanchauhan
Copy link

Good chance I am doing something wrong.

Workfow:

...
jobs:
  generate-and-publish-docs:
    runs-on: macOS-latest
    steps:
      - name: Get da Code
        uses: actions/checkout@v4
      - name: Setup Swift
        uses: swift-actions/setup-swift@v1.25.0
        with:
          swift-version: '5.9'
      - name: Swift Package Documentation Generator
        uses: sersoft-gmbh/swifty-docs-action@v3.0.0
        with:
          transform-for-static-hosting: true
          hosting-base-path: swift-gopher
          targets: |
            GopherHelpers
            swift-gopher
            swiftGopherClient
          output: docs
      - name: Upload Docs
        uses: EndBug/add-and-commit@v9 
        with:
          add: "docs"
          message: Update Documentation
          committer_name: GitHub Actions
          committer_email: actions@github.com

I enabled debug mode on the workflow here

The command is definitely parsing the targets correctly:

  /Users/runner/hostedtoolcache/swift-macOS/5.9/x64/usr/bin/swift package --allow-writing-to-directory /Users/runner/work/swift-gopher/swift-gopher/docs generate-documentation --target GopherHelpers --target swift-gopher --target swiftGopherClient --disable-indexing --transform-for-static-hosting --hosting-base-path swift-gopher --output-path /Users/runner/work/swift-gopher/swift-gopher/docs

...

  [35/37] Compiling swiftGopherClient gopherClient.swift
  [36/37] Emitting module swiftGopherClient
  [37/37] Compiling swiftGopherClient gopherRequestResponseHandler.swift
  Build complete! (13.74s)
  Generating documentation for 'GopherHelpers'...
  Converting documentation...
  Conversion complete! (0.30s)
  Generated DocC archive at '/Users/runner/work/swift-gopher/swift-gopher/docs'
  
  Generating documentation for 'swift-gopher'...
  Converting documentation...
  Conversion complete! (0.20s)
  Generated DocC archive at '/Users/runner/work/swift-gopher/swift-gopher/docs'
  
  Generating documentation for 'swiftGopherClient'...
  Converting documentation...
  Conversion complete! (0.13s)
  Generated DocC archive at '/Users/runner/work/swift-gopher/swift-gopher/docs'
  
  Multiple DocC archives generated at '/Users/runner/work/swift-gopher/swift-gopher/.build/plugins/Swift-DocC/outputs'
  ::endgroup::

But, https://github.com/navanchauhan/swift-gopher/tree/master/docs/documentation/ only has one target

@ffried
Copy link
Member

ffried commented Dec 18, 2023

@navanchauhan This is actually an issue with Swift DocC.
There are already two issues regarding this:

In the latter, I also reference a workflow we're using in a comment.

I've considered doing the merge in this action, but given that A) not everything is easily mergable (metadata.json) and B) the style of the generated index page is certainly up for debate, I've decided not to do it.

@ffried ffried closed this as not planned Won't fix, can't repro, duplicate, stale Dec 18, 2023
@navanchauhan
Copy link
Author

That's fair.

I mentioned in the first issue you referenced, but I ended up creating a bash script to get my targets to work nicely with each other (Also made an unstyled index page)

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