From 7bcefb62929d1787549a371e8692714f43e10ab2 Mon Sep 17 00:00:00 2001 From: Chaeyoon Kim Date: Mon, 1 Jul 2024 23:09:30 +0100 Subject: [PATCH 1/2] Docs: Workflow & Style - Updated author and date - Fixed code errors in callout implementation - Corrected the workflow file path - Updated gitHub actions workflow: added the permissions section (bug PR #49, fixed at PR #52) and updated the action version (a newer version is availabile from PR #54) - Clarified the instructions for configuring the repository before publishing - Included alternative methods using the "Render" button or "Render on Save" option in RStudio, with a screenshot (added to assets) - Added a reference link --- .github/workflows/quarto-publish-example.yaml | 90 ++++++++++++++++++ .../assets/figures/rstudio-editor-toolbar.png | Bin 0 -> 20896 bytes docs/tutorials/github.qmd | 31 ++++-- 3 files changed, 111 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/quarto-publish-example.yaml create mode 100644 docs/assets/figures/rstudio-editor-toolbar.png diff --git a/.github/workflows/quarto-publish-example.yaml b/.github/workflows/quarto-publish-example.yaml new file mode 100644 index 0000000..2e6df99 --- /dev/null +++ b/.github/workflows/quarto-publish-example.yaml @@ -0,0 +1,90 @@ +on: + push: + branches: + - main + pull_request: + branches: + - main + +name: Render and Publish + +# you need these permissions to publish to GitHub pages +permissions: + contents: write + pages: write + +jobs: + build-deploy: + runs-on: ubuntu-latest + + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set up Quarto + uses: quarto-dev/quarto-actions/setup@v2 + + - name: Publish to GitHub Pages (and render) + uses: quarto-dev/quarto-actions/publish@v2 + with: + target: gh-pages + path: docs/_site + tinytex: true + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # To install LaTeX to build PDF book + + # uncomment below and fill to pin a version + # version: SPECIFIC-QUARTO-VERSION-HERE + + # add software dependencies here and any libraries + + # From https://github.com/actions/setup-python + # - name: Setup Python + # uses: actions/setup-python@v3 + + # From https://github.com/r-lib/actions/tree/v2-branch/setup-r + # - name: Setup R + # uses: r-lib/actions/setup-r@v2 + + # From https://github.com/julia-actions/setup-julia + # - name: Setup Julia + # uses: julia-actions/setup-julia@v1 + + # See more at https://github.com/quarto-dev/quarto-actions/blob/main/examples/example-03-dependencies.md + + # To publish to Netlify, RStudio Connect, or GitHub Pages, uncomment + # the appropriate block below + + # - name: Publish to Netlify (and render) + # uses: quarto-dev/quarto-actions/publish@v2 + # with: + # target: netlify + # NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + + # - name: Publish to RStudio Connect (and render) + # uses: quarto-dev/quarto-actions/publish@v2 + # with: + # target: connect + # CONNECT_SERVER: enter-the-server-url-here + # CONNECT_API_KEY: ${{ secrets.CONNECT_API_KEY }} + + # NOTE: If Publishing to GitHub Pages, set the permissions correctly (see top of this yaml) + # - name: Publish to GitHub Pages (and render) + # uses: quarto-dev/quarto-actions/publish@v2 + # with: + # target: gh-pages + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # this secret is always available for github actions + + # - name: Publish to confluence + # uses: quarto-dev/quarto-actions/publish@v2 + # with: + # target: confluence + # env: + # CONFLUENCE_USER_EMAIL: ${{ secrets.CONFLUENCE_USER_EMAIL }} + # CONFLUENCE_AUTH_TOKEN: ${{ secrets.CONFLUENCE_AUTH_TOKEN }} + # CONFLUENCE_DOMAIN: ${{ secrets.CONFLUENCE_DOMAIN }} + + # Add comment to trigger yaml Action + diff --git a/docs/assets/figures/rstudio-editor-toolbar.png b/docs/assets/figures/rstudio-editor-toolbar.png new file mode 100644 index 0000000000000000000000000000000000000000..117a058adcd06e1359c4277154e925fc640c6c8c GIT binary patch literal 20896 zcmbTd1yodB_&16QNGTvCEg)UeHG~pFcOxJo-95B`G*Z$jE!{bUL+8+4LpKcFa7W+w z{eRzg*IoCnbmAlxzp_1=;Mq!h0m7$|%e`BNW7UbbDzXCnO|7+CP6!WK`e6k&sk) zWF+3JgA5K@+(7uijK`y%+vS6~`o5+0#q$h4j~273)P4Qu_PV5Re@i^+$KCkqD25)5 zLo9*w{tc%zU4YmZ9BLArIx#v@)`7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 zd4~?whu-QqvYPZ|+6lYG2rRr2ox#&9Gk5^fadgt(R_A&DZEJ z&;09FR#WRjq@xmcJ}T$|lSOrT@#{<5HCm5XhXkTUg0Q2uYQvPpiqu)DAd4ig;#NNO zryXS(&D|DMkzn-bTc>XbhsMl_`J zC|>O^Jiy7q`cw=2%ulbh?Q)~nZ;2q{IxMK0AWeFK%CR6@FB}M}$i5FvB2W2#|7y|)BB-J;L9LZbL#-%G{V0P; z=-Ta#Krv7r6TUVj|P5ZR42H^m)JBZ4%$pRI(fyG}ViSsatk#gjC@Wk1pz^Z4Av4TjF6Z)|C?Ro@CzrU>k za|_P&{vq2e4LDa4E|H5c{0A@2bYtw7B=mO!4kEKED$}?0<#-JTO;}UETOe(PxzN5z zQ*w&P3t0$N z`2Y~}8-{cO6t-bBUM+O{S$s*yJnSrambJXOa`V0{k}Y)u?2wZcUx~c zvR09K@S>YjRAAqh>89vbC|k>7UL0;&49|v1NOq>wo3(5g+{`nryK<)!92&C6jN{uy zC~g!l%m!E!0JNla4J&TT(pj+FHipaz)ZfLa&%$(_lzHCXwOS@x z%Wn7Oh&9*O+r8!yItL$W=wx#QR$)g94c~GA#;rIR#m2KcIT%s)Q7x5Jh=4i?AVqWn zBUYM7xN#keUZ{G{2hG7Y)h;W*m4Q+;1q6V*3E8vU>!+>oTnRe|j6-1`!%1v>dWR)7 M)Hl Apps`) and can be installed on UDAL VMs. The tool greatly improves the Git experience and makes managing multiple software projects much easier. -![](../assets/figures/github-desktop.png) +![GitHub Desktop screenshot](../assets/figures/github-desktop.png) ## Resources @@ -62,7 +62,7 @@ Publish a Quarto website project to your GitHub pages using GitHub actions. ### Add the GitHub Actions workflow to your project -Copy [quarto-publish.yml](https://github.com/craig-shenton/nhs-r-reporting/blob/main/_assets/actions/quarto-publish-example.yml) to the folder `.github/workflows/quarto-publish.yml`. +Copy [quarto-publish.yml](https://github.com/nhsengland/nhs-r-reporting/blob/main/.github/workflows/quarto-publish-example.yaml) to the folder `.github/workflows/quarto-publish-example.yaml`. ```yaml on: @@ -73,12 +73,17 @@ on: name: Render and Publish +# you need these permissions to publish to GitHub pages +permissions: + contents: write + pages: write + jobs: build-deploy: - runs-on: ubuntu-latest + runs-on: ubuntu-latest steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Quarto uses: quarto-dev/quarto-actions/setup@v2 @@ -87,8 +92,10 @@ jobs: uses: quarto-dev/quarto-actions/publish@v2 with: target: gh-pages + path: docs/_site + tinytex: true env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} ``` ::: {.callout-note} @@ -111,12 +118,16 @@ Do *not* edit the `GITHUB_TOKEN` to add a personal secret to this file. This fil ### Configure the repository before publishing -Quarto needs to configure the repository for publishing through GitHub Actions. To do 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 once. Make sure you're running the command from within the working directory of your Quarto project in RStudio. You can verify the working directory by checking the top left corner of the R console window. If necessary, use the setwd() function in R or find the menu `Session > Set Working Directory > Choose Directory` to change the working directory to your project location. + +You can also use the *Render* button, or check the *Render on Save* option on the editor toolbar: + +![RStudio editor toolbar](../assets/figures/rstudio-editor-toolbar.png) ### Commit and push the workflow Now, add and commit the workflow file you have just created, and push the result to GitHub. This should trigger a new action from GitHub that will automatically render and publish your website through GitHub pages. ::: {.callout-note} -Note that GitHub Pages uses a `gh-pages` branch in your repository, which will be automatically created if one doesn't exist. +Note that GitHub Pages uses a `gh-pages` branch in your repository, which will be automatically created if one doesn't exist. Read more: [Publishing - GitHub Pages](https://quarto.org/docs/publishing/github-pages.html) ::: From 0b4161cd69750e93b75325d89229688ca231c154 Mon Sep 17 00:00:00 2001 From: Chaeyoon Kim Date: Wed, 10 Jul 2024 16:52:16 +0100 Subject: [PATCH 2/2] resolve conflict: git workflow clarified --- .github/workflows/quarto-publish-example.yaml | 2 +- docs/tutorials/github.qmd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/quarto-publish-example.yaml b/.github/workflows/quarto-publish-example.yaml index 2e6df99..22fe8b1 100644 --- a/.github/workflows/quarto-publish-example.yaml +++ b/.github/workflows/quarto-publish-example.yaml @@ -24,7 +24,7 @@ jobs: - name: Set up Quarto uses: quarto-dev/quarto-actions/setup@v2 - - name: Publish to GitHub Pages (and render) + - name: Publish to Github Pages (and render) uses: quarto-dev/quarto-actions/publish@v2 with: target: gh-pages diff --git a/docs/tutorials/github.qmd b/docs/tutorials/github.qmd index fcd3e38..a814c5c 100644 --- a/docs/tutorials/github.qmd +++ b/docs/tutorials/github.qmd @@ -88,7 +88,7 @@ jobs: - name: Set up Quarto uses: quarto-dev/quarto-actions/setup@v2 - - name: Publish to GitHub Pages (and render) + - name: Publish to Github Pages (and render) uses: quarto-dev/quarto-actions/publish@v2 with: target: gh-pages