From 241918f33e7498091a257d3b7fd2df96df89300b Mon Sep 17 00:00:00 2001 From: dsweber2 Date: Thu, 18 Jan 2024 14:37:29 -0800 Subject: [PATCH 01/17] versioning proposal --- .github/workflows/pkgdown_dev.yaml | 52 +++++++++++++++++++ .../{pkgdown.yaml => pkgdown_main.yaml} | 4 +- .github/workflows/require_semver_bump.yaml | 18 +++++++ DESCRIPTION | 2 +- NEWS.md | 11 ++-- _pkgdown.yml | 2 - 6 files changed, 76 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/pkgdown_dev.yaml rename .github/workflows/{pkgdown.yaml => pkgdown_main.yaml} (96%) create mode 100644 .github/workflows/require_semver_bump.yaml diff --git a/.github/workflows/pkgdown_dev.yaml b/.github/workflows/pkgdown_dev.yaml new file mode 100644 index 00000000..1f33c083 --- /dev/null +++ b/.github/workflows/pkgdown_dev.yaml @@ -0,0 +1,52 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +# +# Created with usethis + edited to run on PRs to dev, use API key. +on: + push: + branches: dev + pull_request: + branches: dev + release: + types: [published] + workflow_dispatch: + +name: pkgdown + +jobs: + pkgdown: + # only build docs on the main repository and not forks + if: github.repository_owner == 'cmu-delphi' + runs-on: ubuntu-latest + # Only restrict concurrency for non-PR jobs + concurrency: + group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v3 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::pkgdown, local::. + needs: website + + - name: Build site + env: + DELPHI_EPIDATA_KEY: ${{ secrets.SECRET_EPIPROCESS_GHACTIONS_DELPHI_EPIDATA_KEY }} + run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE, override=list(PKGDOWN_DEV_MODE="devel")) + shell: Rscript {0} + + - name: Deploy to GitHub pages 🚀 + if: github.event_name != 'pull_request' + uses: JamesIves/github-pages-deploy-action@v4.4.1 + with: + clean: false + branch: gh-pages + folder: docs diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown_main.yaml similarity index 96% rename from .github/workflows/pkgdown.yaml rename to .github/workflows/pkgdown_main.yaml index 5d70a744..61d5d9c7 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown_main.yaml @@ -4,9 +4,9 @@ # Created with usethis + edited to run on PRs to dev, use API key. on: push: - branches: [main, dev] + branches: [main] pull_request: - branches: [main, dev] + branches: [main] release: types: [published] workflow_dispatch: diff --git a/.github/workflows/require_semver_bump.yaml b/.github/workflows/require_semver_bump.yaml new file mode 100644 index 00000000..46d4f700 --- /dev/null +++ b/.github/workflows/require_semver_bump.yaml @@ -0,0 +1,18 @@ +name: semver-check + +on: + pull_request: + branches: [main, dev] + +jobs: + verify: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: rayepps/require-semver-bump@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + file: DESCRIPTION + pattern: > + Version:\s(.+?) diff --git a/DESCRIPTION b/DESCRIPTION index 2566dcb0..d9bdb435 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: epiprocess Title: Tools for basic signal processing in epidemiology -Version: 0.7.1.9999 +Version: 0.7.1 Authors@R: c( person("Jacob", "Bien", role = "ctb"), person("Logan", "Brooks", role = "aut"), diff --git a/NEWS.md b/NEWS.md index ef3045c0..1bf9da0f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,11 +1,6 @@ -# epiprocess 0.7.1.9999 +# epiprocess 0.7.1 -Note that `epiprocess` uses the [Semantic Versioning -("semver")](https://semver.org/) scheme for all release versions, but any -inter-release development versions will include an additional ".9999" suffix. -Pre-1.0.0 numbering scheme: when making changes to a development version -0.x.y.9999, we will increment y when merging PRs, and will have increment x (and -reset y) on release. +Pre-1.0.0 numbering scheme: 0.x will indicate releases, while 0.7.x will indicate PR's. ## Breaking changes @@ -16,7 +11,7 @@ reset y) on release. * `select` on grouped `epi_df`s now only drops `epi_df`ness if it makes sense; PR #390 * Minor documentation updates; PR #393 -# epiprocess 0.7.0.9999 +# epiprocess 0.7.0 ## Improvements diff --git a/_pkgdown.yml b/_pkgdown.yml index e6bacebf..4efc4920 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -1,8 +1,6 @@ template: bootstrap: 5 -development: - mode: auto # Colors from epipredict & epidatr, including Carnegie Red https://www.cmu.edu/brand/brand-guidelines/visual-identity/colors.html navbar: From eb9914b1db32509e7a994728434b5d685bee6b10 Mon Sep 17 00:00:00 2001 From: dsweber2 Date: Thu, 18 Jan 2024 14:48:24 -0800 Subject: [PATCH 02/17] specify main is the release --- .github/workflows/pkgdown_main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pkgdown_main.yaml b/.github/workflows/pkgdown_main.yaml index 61d5d9c7..a72010f5 100644 --- a/.github/workflows/pkgdown_main.yaml +++ b/.github/workflows/pkgdown_main.yaml @@ -40,7 +40,7 @@ jobs: - name: Build site env: DELPHI_EPIDATA_KEY: ${{ secrets.SECRET_EPIPROCESS_GHACTIONS_DELPHI_EPIDATA_KEY }} - run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) + run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE, override=list(PKGDOWN_DEV_MODE="release")) shell: Rscript {0} - name: Deploy to GitHub pages 🚀 From 5d3c6d15f2b4ed310161efbe9715844437c30d30 Mon Sep 17 00:00:00 2001 From: dsweber2 Date: Thu, 18 Jan 2024 14:52:32 -0800 Subject: [PATCH 03/17] testing semver check --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index d9bdb435..2566dcb0 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: epiprocess Title: Tools for basic signal processing in epidemiology -Version: 0.7.1 +Version: 0.7.1.9999 Authors@R: c( person("Jacob", "Bien", role = "ctb"), person("Logan", "Brooks", role = "aut"), From 7c3b48b49b4992d28c721259ffa89abe809ea783 Mon Sep 17 00:00:00 2001 From: dsweber2 Date: Thu, 18 Jan 2024 14:53:24 -0800 Subject: [PATCH 04/17] semver works, actual version --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 2566dcb0..d9bdb435 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: epiprocess Title: Tools for basic signal processing in epidemiology -Version: 0.7.1.9999 +Version: 0.7.1 Authors@R: c( person("Jacob", "Bien", role = "ctb"), person("Logan", "Brooks", role = "aut"), From 5c6f2da1f73017b4691d0a79aed9522042c40643 Mon Sep 17 00:00:00 2001 From: dsweber2 Date: Thu, 18 Jan 2024 14:57:55 -0800 Subject: [PATCH 05/17] semver correct regex --- .github/workflows/require_semver_bump.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/require_semver_bump.yaml b/.github/workflows/require_semver_bump.yaml index 46d4f700..e1770e14 100644 --- a/.github/workflows/require_semver_bump.yaml +++ b/.github/workflows/require_semver_bump.yaml @@ -15,4 +15,4 @@ jobs: with: file: DESCRIPTION pattern: > - Version:\s(.+?) + Version:\s(.+?\..+?\..+?.*) From aaab8c248cde10293b243c067f39bb3bdd82d92b Mon Sep 17 00:00:00 2001 From: dsweber2 Date: Thu, 18 Jan 2024 15:01:10 -0800 Subject: [PATCH 06/17] only 3 places for the action --- .github/workflows/require_semver_bump.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/require_semver_bump.yaml b/.github/workflows/require_semver_bump.yaml index e1770e14..bdf20f0d 100644 --- a/.github/workflows/require_semver_bump.yaml +++ b/.github/workflows/require_semver_bump.yaml @@ -15,4 +15,4 @@ jobs: with: file: DESCRIPTION pattern: > - Version:\s(.+?\..+?\..+?.*) + Version:\s(.+?\..+?\..+?) From f1d6bc1c2a728366eb59f990e8cd6e83854bc77f Mon Sep 17 00:00:00 2001 From: dsweber2 Date: Thu, 18 Jan 2024 15:02:25 -0800 Subject: [PATCH 07/17] version bump for PR --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index d9bdb435..15b7757f 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: epiprocess Title: Tools for basic signal processing in epidemiology -Version: 0.7.1 +Version: 0.7.2 Authors@R: c( person("Jacob", "Bien", role = "ctb"), person("Logan", "Brooks", role = "aut"), From ada710e5d23ae4e2f9955afac3cd0368ab0fde87 Mon Sep 17 00:00:00 2001 From: dsweber2 Date: Fri, 19 Jan 2024 11:35:52 -0800 Subject: [PATCH 08/17] regex that actually matches more than 1 digit --- .github/workflows/require_semver_bump.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/require_semver_bump.yaml b/.github/workflows/require_semver_bump.yaml index bdf20f0d..548ceb1e 100644 --- a/.github/workflows/require_semver_bump.yaml +++ b/.github/workflows/require_semver_bump.yaml @@ -15,4 +15,4 @@ jobs: with: file: DESCRIPTION pattern: > - Version:\s(.+?\..+?\..+?) + Version:\s(\d+\.\d+\.\d+\d*) From 8f7c1c3e6502ca19b78bee26e07775935a2e8a28 Mon Sep 17 00:00:00 2001 From: dsweber2 Date: Fri, 19 Jan 2024 15:37:52 -0800 Subject: [PATCH 09/17] Nat's suggestion --- .github/workflows/auto_semver_bump.yaml | 23 +++++++++++++++++++ .github/workflows/version_bump_options.json | 25 +++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 .github/workflows/auto_semver_bump.yaml create mode 100644 .github/workflows/version_bump_options.json diff --git a/.github/workflows/auto_semver_bump.yaml b/.github/workflows/auto_semver_bump.yaml new file mode 100644 index 00000000..796ea20d --- /dev/null +++ b/.github/workflows/auto_semver_bump.yaml @@ -0,0 +1,23 @@ +# this action: https://github.com/marketplace/actions/version-bumper +# also see the options file for configuration +name: Manage versions + +# not actually on all pushes, see the options file +on: [push] + +jobs: + bump: + #if: github.event.pull_request.merged == true + runs-on: ubuntu-latest + + steps: + # Checkout action is required + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: "12" + - name: Bump Versions + uses: michmich112/version-bumper@master + with: + options-file: "./.github/workflows/version_bump_options.json" + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/version_bump_options.json b/.github/workflows/version_bump_options.json new file mode 100644 index 00000000..bbdeb936 --- /dev/null +++ b/.github/workflows/version_bump_options.json @@ -0,0 +1,25 @@ +{ + "scheme": "semantic", + "versionFile": "./DESCRIPTION", + "files": [], + "rules": [ + { + "trigger": "commit", + "bump": "build" + }, + { + "trigger": "commit", + "bump": "minor", + "branch": "main", + "tag": true, + "reset": "build" + }, + { + "trigger": "commit", + "bump": "major", + "branch": "release", + "tag": true, + "reset": ["minor", "build"] + } + ] +} From cce5d8cc1408fa05e934d9c60b88c409f9b29fc1 Mon Sep 17 00:00:00 2001 From: version-bumper Date: Fri, 19 Jan 2024 23:38:23 +0000 Subject: [PATCH 10/17] "Updated version 0.7.2 -> 0.7.3." --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 15b7757f..94ac3214 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: epiprocess Title: Tools for basic signal processing in epidemiology -Version: 0.7.2 +Version: 0.7.3 Authors@R: c( person("Jacob", "Bien", role = "ctb"), person("Logan", "Brooks", role = "aut"), From 9413804837bfc23ef008615e74c2acce8311c0ab Mon Sep 17 00:00:00 2001 From: version-bumper Date: Fri, 19 Jan 2024 23:42:51 +0000 Subject: [PATCH 11/17] "Updated version 0.7.3 -> 0.7.4." --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 94ac3214..4f5a61ab 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: epiprocess Title: Tools for basic signal processing in epidemiology -Version: 0.7.3 +Version: 0.7.4 Authors@R: c( person("Jacob", "Bien", role = "ctb"), person("Logan", "Brooks", role = "aut"), From 44b4440635e1b80cba4bca20b881cddcf94ca881 Mon Sep 17 00:00:00 2001 From: dsweber2 Date: Fri, 19 Jan 2024 15:47:51 -0800 Subject: [PATCH 12/17] only bump build version on commits in dev --- .github/workflows/version_bump_options.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/version_bump_options.json b/.github/workflows/version_bump_options.json index bbdeb936..a2f6aed9 100644 --- a/.github/workflows/version_bump_options.json +++ b/.github/workflows/version_bump_options.json @@ -5,6 +5,7 @@ "rules": [ { "trigger": "commit", + "branch": "dev", "bump": "build" }, { From eeefc94130b00e90f9c44c48e707799690d5d854 Mon Sep 17 00:00:00 2001 From: dsweber2 Date: Fri, 19 Jan 2024 15:48:45 -0800 Subject: [PATCH 13/17] roll back aggressive versioning --- .github/workflows/require_semver_bump.yaml | 18 ------------------ DESCRIPTION | 2 +- 2 files changed, 1 insertion(+), 19 deletions(-) delete mode 100644 .github/workflows/require_semver_bump.yaml diff --git a/.github/workflows/require_semver_bump.yaml b/.github/workflows/require_semver_bump.yaml deleted file mode 100644 index 548ceb1e..00000000 --- a/.github/workflows/require_semver_bump.yaml +++ /dev/null @@ -1,18 +0,0 @@ -name: semver-check - -on: - pull_request: - branches: [main, dev] - -jobs: - verify: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: rayepps/require-semver-bump@v1 - env: - GITHUB_TOKEN: ${{ github.token }} - with: - file: DESCRIPTION - pattern: > - Version:\s(\d+\.\d+\.\d+\d*) diff --git a/DESCRIPTION b/DESCRIPTION index 4f5a61ab..15b7757f 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: epiprocess Title: Tools for basic signal processing in epidemiology -Version: 0.7.4 +Version: 0.7.2 Authors@R: c( person("Jacob", "Bien", role = "ctb"), person("Logan", "Brooks", role = "aut"), From f4cce8f083724600eaf164f08ba51189900a08b3 Mon Sep 17 00:00:00 2001 From: dsweber2 Date: Tue, 23 Jan 2024 14:11:28 -0800 Subject: [PATCH 14/17] merge version bump from main back to dev --- .github/workflows/release-helper.yaml | 31 +++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/release-helper.yaml diff --git a/.github/workflows/release-helper.yaml b/.github/workflows/release-helper.yaml new file mode 100644 index 00000000..c585a1a7 --- /dev/null +++ b/.github/workflows/release-helper.yaml @@ -0,0 +1,31 @@ +name: Release Helper + +on: + push: + branches: + - main + +jobs: + sync_dev: + needs: correct_repository + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v2 + with: + ref: dev + ssh-key: ${{ secrets.CMU_DELPHI_DEPLOY_MACHINE_SSH }} + - name: Reset dev branch + run: | + git fetch origin main:main + git reset --hard main + - name: Create pull request into dev + uses: peter-evans/create-pull-request@v3 + with: + branch: bot/sync-main-dev + commit-message: "chore: sync main-dev" + base: dev + title: "chore: sync main->dev" + labels: chore + body: | + Syncing Main->Dev. From 4fd4d89e625468db1e81c20c0fcfe628ecc1683f Mon Sep 17 00:00:00 2001 From: dsweber2 Date: Thu, 25 Jan 2024 11:10:09 -0800 Subject: [PATCH 15/17] nat suggestions --- .../{workflows => }/version_bump_options.json | 7 ------- .../workflows/{pkgdown_dev.yaml => pkgdown.yaml} | 4 +++- .github/workflows/release-helper.yaml | 16 ++++------------ 3 files changed, 7 insertions(+), 20 deletions(-) rename .github/{workflows => }/version_bump_options.json (68%) rename .github/workflows/{pkgdown_dev.yaml => pkgdown.yaml} (87%) diff --git a/.github/workflows/version_bump_options.json b/.github/version_bump_options.json similarity index 68% rename from .github/workflows/version_bump_options.json rename to .github/version_bump_options.json index a2f6aed9..38e2b63b 100644 --- a/.github/workflows/version_bump_options.json +++ b/.github/version_bump_options.json @@ -14,13 +14,6 @@ "branch": "main", "tag": true, "reset": "build" - }, - { - "trigger": "commit", - "bump": "major", - "branch": "release", - "tag": true, - "reset": ["minor", "build"] } ] } diff --git a/.github/workflows/pkgdown_dev.yaml b/.github/workflows/pkgdown.yaml similarity index 87% rename from .github/workflows/pkgdown_dev.yaml rename to .github/workflows/pkgdown.yaml index 1f33c083..aa7ddec3 100644 --- a/.github/workflows/pkgdown_dev.yaml +++ b/.github/workflows/pkgdown.yaml @@ -40,7 +40,9 @@ jobs: - name: Build site env: DELPHI_EPIDATA_KEY: ${{ secrets.SECRET_EPIPROCESS_GHACTIONS_DELPHI_EPIDATA_KEY }} - run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE, override=list(PKGDOWN_DEV_MODE="devel")) + run: | + mode <- ifelse("${{ GITHUB_BASE_REF }}" == "main", "release", "devel") + pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE, override=list(PKGDOWN_DEV_MODE=mode)) shell: Rscript {0} - name: Deploy to GitHub pages 🚀 diff --git a/.github/workflows/release-helper.yaml b/.github/workflows/release-helper.yaml index c585a1a7..cc0bc6fa 100644 --- a/.github/workflows/release-helper.yaml +++ b/.github/workflows/release-helper.yaml @@ -11,21 +11,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: ref: dev + fetch-depth: 0 ssh-key: ${{ secrets.CMU_DELPHI_DEPLOY_MACHINE_SSH }} - name: Reset dev branch run: | git fetch origin main:main - git reset --hard main - - name: Create pull request into dev - uses: peter-evans/create-pull-request@v3 - with: - branch: bot/sync-main-dev - commit-message: "chore: sync main-dev" - base: dev - title: "chore: sync main->dev" - labels: chore - body: | - Syncing Main->Dev. + git merge main + git push From 283fba2c5f4a0a130fd39b1c8eb83b569b6d3dce Mon Sep 17 00:00:00 2001 From: dsweber2 Date: Thu, 25 Jan 2024 11:43:20 -0800 Subject: [PATCH 16/17] fix path, mode source --- .github/workflows/auto_semver_bump.yaml | 2 +- .github/workflows/pkgdown.yaml | 6 ++- .github/workflows/pkgdown_main.yaml | 52 ------------------------- 3 files changed, 6 insertions(+), 54 deletions(-) delete mode 100644 .github/workflows/pkgdown_main.yaml diff --git a/.github/workflows/auto_semver_bump.yaml b/.github/workflows/auto_semver_bump.yaml index 796ea20d..66d32a56 100644 --- a/.github/workflows/auto_semver_bump.yaml +++ b/.github/workflows/auto_semver_bump.yaml @@ -19,5 +19,5 @@ jobs: - name: Bump Versions uses: michmich112/version-bumper@master with: - options-file: "./.github/workflows/version_bump_options.json" + options-file: "./.github/version_bump_options.json" github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index aa7ddec3..ba2ac596 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -41,7 +41,11 @@ jobs: env: DELPHI_EPIDATA_KEY: ${{ secrets.SECRET_EPIPROCESS_GHACTIONS_DELPHI_EPIDATA_KEY }} run: | - mode <- ifelse("${{ GITHUB_BASE_REF }}" == "main", "release", "devel") + if (startsWith("${{ GITHUB_EVENT_NAME }}", "pull_request")) { + mode <- ifelse("${{ GITHUB_BASE_REF }}" == "main", "release", "devel") + } else { + mode <- ifelse("${{ GITHUB_REF_NAME }}" == "main", "release", "devel") + } pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE, override=list(PKGDOWN_DEV_MODE=mode)) shell: Rscript {0} diff --git a/.github/workflows/pkgdown_main.yaml b/.github/workflows/pkgdown_main.yaml deleted file mode 100644 index a72010f5..00000000 --- a/.github/workflows/pkgdown_main.yaml +++ /dev/null @@ -1,52 +0,0 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples -# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help -# -# Created with usethis + edited to run on PRs to dev, use API key. -on: - push: - branches: [main] - pull_request: - branches: [main] - release: - types: [published] - workflow_dispatch: - -name: pkgdown - -jobs: - pkgdown: - # only build docs on the main repository and not forks - if: github.repository_owner == 'cmu-delphi' - runs-on: ubuntu-latest - # Only restrict concurrency for non-PR jobs - concurrency: - group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - steps: - - uses: actions/checkout@v3 - - - uses: r-lib/actions/setup-pandoc@v2 - - - uses: r-lib/actions/setup-r@v2 - with: - use-public-rspm: true - - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - extra-packages: any::pkgdown, local::. - needs: website - - - name: Build site - env: - DELPHI_EPIDATA_KEY: ${{ secrets.SECRET_EPIPROCESS_GHACTIONS_DELPHI_EPIDATA_KEY }} - run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE, override=list(PKGDOWN_DEV_MODE="release")) - shell: Rscript {0} - - - name: Deploy to GitHub pages 🚀 - if: github.event_name != 'pull_request' - uses: JamesIves/github-pages-deploy-action@v4.4.1 - with: - clean: false - branch: gh-pages - folder: docs From af454f80f743ba8be81354350d7626d26ce80bf4 Mon Sep 17 00:00:00 2001 From: dsweber2 Date: Thu, 25 Jan 2024 11:53:44 -0800 Subject: [PATCH 17/17] merging dev/main pkgdown workflows --- .github/workflows/pkgdown.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index ba2ac596..c3186e19 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -4,9 +4,9 @@ # Created with usethis + edited to run on PRs to dev, use API key. on: push: - branches: dev + branches: [dev, main] pull_request: - branches: dev + branches: [dev, main] release: types: [published] workflow_dispatch: