publish-jazzy-docs icon indicating copy to clipboard operation
publish-jazzy-docs copied to clipboard

Can't pass xcodebuild arguments through args

Open fishercraigj opened this issue 4 years ago • 2 comments

Describe the bug If I run Jazzy locally everything works fine with --xcodebuild-arguments. Example would be jazzy --clean --min-acl private --xcodebuild-arguments -workspace,myApp.xcworkspace,-scheme,mySchemeName

Running those same exact arguments through this action gives me a really odd error:

`name: Jazzy Documentation

on: push: branches: - develop pull_request: branches: - develop

jobs: deploy_docs: runs-on: macos-latest steps: - uses: actions/checkout@v1 - name: Publish Jazzy Docs uses: steven0351/publish-jazzy-docs@v1 with: personal_access_token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx args: "--clean --min-acl private --xcodebuild-arguments -workspace,myApp.xcworkspace,-scheme,mySchemeName"`

Log Output Running xcodebuild Could not successfully run xcodebuild. Please check the build arguments. Saved xcodebuildlog file: /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/xcodebuild-80B952FE-6F31-4C42-81B7-29AB2AE5D446.log Failed to generate documentation /usr/local/lib/ruby/gems/2.6.0/gems/jazzy-0.13.4/lib/jazzy/executable.rb:36:inexecute_command': /usr/local/lib/ruby/gems/2.6.0/gems/jazzy-0.13.4/bin/sourcekitten ["doc", "--", "-workspace", "myApp.xcworkspace", "-scheme", "mySchemeName"] (RuntimeError)

Running xcodebuild

Could not successfully run xcodebuild.

Please check the build arguments.

Saved xcodebuild log file: /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/xcodebuild-80B952FE-6F31-4C42-81B7-29AB2AE5D446.log

Failed to generate documentation from /usr/local/lib/ruby/gems/2.6.0/gems/jazzy-0.13.4/lib/jazzy/sourcekitten.rb:266:in run_sourcekitten' from /usr/local/lib/ruby/gems/2.6.0/gems/jazzy-0.13.4/lib/jazzy/doc_builder.rb:78:in block in build' from /usr/local/lib/ruby/gems/2.6.0/gems/jazzy-0.13.4/lib/jazzy/doc_builder.rb:76:in chdir' from /usr/local/lib/ruby/gems/2.6.0/gems/jazzy-0.13.4/lib/jazzy/doc_builder.rb:76:in build' from /usr/local/lib/ruby/gems/2.6.0/gems/jazzy-0.13.4/bin/jazzy:15:in <top (required)>' from /usr/local/lib/ruby/gems/2.6.0/bin/jazzy:23:in load' from /usr/local/lib/ruby/gems/2.6.0/bin/jazzy:23:in `

' Initialized empty Git repository in /Users/runner/runners/2.263.0/work/dod-ios/.docs/.git/ [master (root-commit) 3c060b9] Deploying Updated Jazzy Docs 1 file changed, 1 insertion(+) create mode 100644 README.txt To https://github.com/doctorondemand/dod-ios.git

  • f9bbf00...3c060b9 master -> gh-pages (forced update)`

The only error that I'm getting is "Runtime Error". I feel like I'm missing something simple but I've pounded at this for a long time. I tried to find examples using the xcodebuild arguments in the yaml config file but not able to find much. If you have an example of then that would prove very useful.

fishercraigj avatar Jul 01 '20 21:07 fishercraigj

What version of jazzy do you have locally? If you don’t specify the jazzy version in your yaml it will pull the latest. I had a similar issue myself and explicitly set jazzy to a previous version and it worked fine.

I would be pretty surprised if the action itself had anything to do with the error because all I do is forward the arguments straight to jazzy.

Steven0351 avatar Jul 01 '20 23:07 Steven0351

Here’s a link to a run on one of my projects where that failed (expand the generate document step): https://github.com/SwiftyTesseract/SwiftyTesseract/runs/619310358?check_suite_focus=true

I had the same failure with jazzy 0.13.3. I explicitly set the jazzy version to 0.13.1 and didn’t have the issue afterwards.

Steven0351 avatar Jul 02 '20 01:07 Steven0351