Skip to content

Adding pkgdown site built by GHA - #1955

Merged
cderv merged 52 commits into
rstudio:masterfrom
apreshill:pkgdown-quillt
Feb 25, 2021
Merged

cderv merged 52 commits into
rstudio:masterfrom
apreshill:pkgdown-quillt

Conversation

@apreshill

Copy link
Copy Markdown
Contributor

Leaving as a draft for now while we finalize the pkgdown template design (cc @cderv)

This site currently publishes to: https://pkgs.rstudio.com/rmarkdown/

The site is in the RStudio Netlify org.

To do before merging:

  1. Finalize pkgdown template (adding book to homepage)

  2. Change the branch to deploy from in the GH action to master

  3. Add 2 secrets (NETLIFY_AUTH_TOKEN and NETLIFY_SITE_ID) to this repo. I don't have admin access to add myself.

  4. Add a code of conduct (required by Netlify's open source policy)

Note: we currently depend on the dev version of pkgdown to render NEWS.md correctly.

@cderv cderv mentioned this pull request Nov 23, 2020
cderv referenced this pull request Dec 15, 2020
Comment thread .github/workflows/pkgdown.yaml Resolved
Comment thread .github/workflows/pkgdown.yaml Resolved
@cderv

cderv commented Dec 15, 2020 •

Copy link
Copy Markdown
Collaborator

What is missing to move ahead for a first version online on the new website ?

I think currently we are on a weird state with:

So we got two sites and I don't think that is ideal - or at least they should be in sync regarding the version.
I know we've been busy on other topic but we should move out from this in-between state.

One generic remark about our pkgdown site : How do we position regarding dev version ?

  • CRAN version will always be X.Y
  • Dev version will be X.Y.Z

Are we okay with only one site as we have currently ? Or do we need to get two sites ?
pkgdown has a development mode to allow a release site in docs/ and devel site in docs/devel. There is mode auto based on the version in description but it works only with a convention of x.y.z for a released version and x.y.z.* for a development version - which won't work for us. So that would require a non automatic workflow.

apreshill and others added 2 commits December 18, 2020 10:27
Merge branch 'master' of github.com:rstudio/rmarkdown into pkgdown-quillt

# Conflicts:
#	.github/workflows/pkgdown.yaml
#	pkgdown/_pkgdown.yml
Conflicts:
.github/workflows/pkgdown.yaml: Merge two workflows and deactivate
publishing to avoid overwrite the current website
pkgdown/_pkgdown.yml: Keep the new yaml in this branch
Comment thread .github/workflows/pkgdown.yaml Resolved
@cderv

cderv commented Feb 17, 2021 •

Copy link
Copy Markdown
Collaborator

I think this is now ready. If I take the checklist from your first post

During the work session with @apreshill we discussed a bit #1955 (comment). Currently, the versionning of our packages is not supported by the mode auto for development. This means that currently our site is build for the development version always. So, about that:

A part from the both uncheck box above, I think this is ready to be merged now. We just need you final review @yihui and come up with a switch plan with the two websites.

As a reminder the published version of this branch is here: https://pkgs.rstudio.com/rmarkdown/

@cderv
cderv requested a review from yihui February 17, 2021 19:21
@cderv
cderv marked this pull request as ready for review February 17, 2021 19:21
* build on Linux
* install sys deps
* install package after deps
cderv added a commit to apreshill/bookdown that referenced this pull request Feb 18, 2021

@yihui yihui left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added these secrets and the site should be published to rmarkdown-pkg.netlify.app now. With d52322f, https://rmarkdown.rstudio.com/docs/ should also point to this site. Previously, it pointed to rmarkdown-docs.netlify.com, and this site will be retired.

Currently, the versionning of our packages is not supported by the mode auto for development.

I feel pkgdown's auto mode could have been able to detect if a version is a dev version regardless of the version number scheme (i.e. not requiring authors to use x.y.z.9000). For example, when building NEWS.md, it knows that a version is unreleased: https://pkgs.rstudio.com/rmarkdown/news/index.html#rmarkdown-2-8-unreleased

Anyway, that's not super important to me, and the tooltip is good enough. I don't really care. I prefer not having both https://pkgs.rstudio.com/rmarkdown/ and https://pkgs.rstudio.com/rmarkdown/dev/.

  • Add a code of conduct (required by Netlify's open source policy)

That is required only for users of their open source plan. We use their Pro plan, so this requirement doesn't really apply to us. That said, I'm okay with adding a link to https://www.contributor-covenant.org/version/2/0/code_of_conduct/.

Thanks!

@apreshill

Copy link
Copy Markdown
Contributor Author

Just a note:
Add a code of conduct (required by Netlify's open source policy)

That is required only for users of their open source plan. We use their Pro plan, so this requirement doesn't really apply to us. That said, I'm okay with adding a link to https://www.contributor-covenant.org/version/2/0/code_of_conduct/.


Yes, this was because we were planning to move our pkgdown sites for open source packages to an open source org, off the Pro account.

usethis::use_code_of_conduct(".github")
@yihui

yihui commented Feb 24, 2021

Copy link
Copy Markdown
Collaborator

Oh I forgot to mention one minor thing yesterday: make sure the PNGs are optimized (you can brew install optipng and run xfun::optipng()). Same thing for rstudio/blogdown#511 and rstudio/bookdown#1028.

@cderv

cderv commented Feb 24, 2021

Copy link
Copy Markdown
Collaborator

Yes I'll recheck that but I did use webshot2::shrink() which does the same.

@yihui

yihui commented Feb 24, 2021

Copy link
Copy Markdown
Collaborator

Okay. We also have other PNG files (e.g., the hex logos and icons).

Comment thread .github/workflows/pkgdown.yaml Outdated
netlify deploy --prod --dir docs
- name: Deploy to Netlify
# only deploy on the fork for now
if: github.repository_owner == 'apreshill'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To remove before merge

@cderv

cderv commented Feb 24, 2021

Copy link
Copy Markdown
Collaborator

@apreshill I believe this is now ready. Yihui has set the secrets to prepare the switch so we are good.
There is just the contact email for CoC to add once it is confirmed.

Is it good for you for this one ? Is this ok to merge ? Thanks.

@apreshill

Copy link
Copy Markdown
Contributor Author

I think so!

@cderv
cderv merged commit 511b413 into rstudio:master Feb 25, 2021
j-magnolia added a commit to j-magnolia/rmarkdown that referenced this pull request Mar 3, 2021
Merge remote-tracking branch 'rstudio_origin/master' into jg-devel

* rstudio_origin/master: (26 commits)
  Use data-external=1 to prevent encoding by Pandoc of img src
  add `subdirs` documentation for site generator (rstudio#2058)
  fix: corrected typo in `ghostscript` (rstudio#2059)
  Add CoC contact email
  quillt has moved to rstudio/quillt
  fix invalid HTML code in shiny_prerendered documents (rstudio#1942)
  Allow pkgdown PR preview (rstudio#2055)
  Adding pkgdown site built by GHA (rstudio#1955)
  Add shiny bslib dependency inside html_document_base pre-process (rstudio#2049)
  start the next version
  CRAN release v2.7
  place <div> in \code{}
  amend 62ae2ed and rstudio#1989: make sure output_format_filter is a function; testing NULL is not enough, e.g., the radix package still calls
  use CRAN releases of shiny and bslib
  tweak news
  Only keep the first url in citation  (rstudio#2041)
  Fix for knit_print.data.frame (rstudio#2050)
  set gfm_auto_identifiers to input format if toc is TRUE (rstudio#2040)
  Enable pkgdown/downlit cross-package links to rmarkdown (rstudio#1843)
  update CONTRIBUTING.md
  ...

# Conflicts:
#	DESCRIPTION
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants