quarto-ext / manuscript-template-rstudio

https://quarto-ext.github.io/manuscript-template-rstudio/
18 stars 11 forks source link

ERROR: No _publish.yml file available #1

Closed benmarwick closed 9 months ago

benmarwick commented 1 year ago

Hello, this manuscript template looks very exciting and I am eager to use it! Thank you so much for making this available and documenting it so carefully.

I'm following the instructions here: https://quarto.org/docs/manuscripts/ on my repo here https://github.com/benmarwick/manuscript-template-rstudio and getting some 'error when opening file' alerts when rendering, and GitHub Actions fails with the error "No _publish.yml file available", e.g. https://github.com/benmarwick/manuscript-template-rstudio/actions/runs/6527717937/job/17722929330.

Looking here https://github.com/quarto-dev/quarto-actions/blob/main/publish/README.md I saw instructions to run quarto publish gh-pages which seemed relevant for creating the _publish.yml file. Running that gave this error:

ERROR: NotFound: No such file or directory (os error 2): rename '/Users/bmarwick/Downloads/manuscript-template-rstudio/notebooks/explore-earthquakes.embed.ipynb' -> '/Users/bmarwick/Downloads/manuscript-template-rstudio/_manuscript/notebooks/explore-earthquakes.embed.ipynb' 

After running quarto publish gh-pages, and running quarto publish netlify for good measure, I pushed, and Github Actions completed successfully. I can see the article as a webpage as expected, here https://benmarwick.github.io/manuscript-template-rstudio/ So that's satisfying, but a bit confusing because of the error messages at the terminal, and because those steps to get it working are not in the manuscripts documentation.

image
> sessionInfo()
R version 4.3.1 (2023-06-16)
Platform: x86_64-apple-darwin20 (64-bit)
Running under: macOS Monterey 12.6

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: America/Los_Angeles
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.3.1 tools_4.3.1  
quarto --version
1.4.424
cderv commented 1 year ago

I think this is related to

Looking here quarto-dev/quarto-actions@main/publish/README.md I saw instructions to run quarto publish gh-pages which seemed relevant for creating the _publish.yml file. Running that gave this error:

This should be indeed the solution. I am not sure about the error you get about renaming failing.

Did it worked correct at the end to publish on gh-pages ?

benmarwick commented 1 year ago

Yes, thank you, the other issues look very relevant.

To confirm, I just now created a new repo, following the instructions here https://quarto.org/docs/manuscripts/ and got an error about a missing _publish.yml file. Then after running only quarto publish gh-pages everything worked as expected, yes. I didn't get any missing file messages this time.

So perhaps the fix here is simply adding something like this:

"Run quarto publish gh-pages locally, once. Quarto needs to configure the repository for publishing through GitHub Actions. To do this, run quarto publish gh-pages locally."

after quarto render into the instructions on https://quarto.org/docs/manuscripts/ what do you think?