From 728327daa55cfe86e5c85b2604ca1e241bf8f940 Mon Sep 17 00:00:00 2001 From: "George G. Vega Yon" Date: Wed, 23 Oct 2024 15:15:36 -0600 Subject: [PATCH 1/4] Adding action to post artifact --- .github/workflows/pkgdown.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index cee6d2e3..fb4b171d 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -21,6 +21,7 @@ jobs: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} permissions: contents: write + pull-requests: write steps: - uses: actions/checkout@v4 @@ -39,6 +40,20 @@ jobs: run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) shell: Rscript {0} + - name: Save artifact + if: ${{ github.event_name == 'pull_request' }} + uses: actions/upload-artifact@v4 + with: + name: pkgdown-site + retention-days: 7 + + - name: Post to PR + uses: CDCgov/cfa-actions/post-artifact@v1.0.0 + if: ${{ github.event_name == 'pull_request' }} + with: + artifact-name: pkgdown-site + gh-token: ${{ secrets.GITHUB_TOKEN }} + - name: Deploy to GitHub pages 🚀 if: github.event_name != 'pull_request' uses: JamesIves/github-pages-deploy-action@v4.5.0 From 5b86d469701cfb7485d9dcb03d0d8c948577a78b Mon Sep 17 00:00:00 2001 From: "George G. Vega Yon" Date: Wed, 23 Oct 2024 15:18:05 -0600 Subject: [PATCH 2/4] Forgot to add path --- .github/workflows/pkgdown.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index fb4b171d..6265f6a6 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -45,6 +45,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: pkgdown-site + path: ./docs retention-days: 7 - name: Post to PR From 6d0cd821b5d0ff9efd548f60b1ba214eaba276d3 Mon Sep 17 00:00:00 2001 From: "George G. Vega Yon" Date: Wed, 23 Oct 2024 15:19:19 -0600 Subject: [PATCH 3/4] Forgot to update news --- NEWS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS.md b/NEWS.md index 8b3e088c..c6c7c582 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,6 @@ # CFAEpiNow2Pipeline (development version) +* Adding new action to post a comment on PRs with a link to the rendered pkgdown site. * Re-organizing GitHub workflows. * Checks if batch pool exists. Pools are named after branches. Also allows for deletion via commit message. * Merges workflows 1 and 2 into a single workflow. From 2b34a2435c8eb21e0eae38dab4ea4f6f0cbfb0cd Mon Sep 17 00:00:00 2001 From: "George G. Vega Yon" Date: Thu, 24 Oct 2024 15:39:25 -0600 Subject: [PATCH 4/4] Fixing enum --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 98ad2404..bb4b7dd0 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ In this workflow, task IDs correspond to location specific model runs (which are │ ├── job_metadata.json ``` -`/`: The base output directory. This could, for example, be `/` in a Docker container or dedicated output directory. +- `/`: The base output directory. This could, for example, be `/` in a Docker container or dedicated output directory. - `job_/`: A directory named after the specific job identifier, containing all outputs related to that job. All tasks within a job share this same top-level directory. - `raw_samples/`: A subdirectory within each job folder that holds the raw sample files from all tasks in the job. Task-specific *draws* output files all live together in this directory to enable easy globbing over task-partitioned outputs. - `samples_.parquet`: A file containing raw samples from the model, associated with a particular task identifier. This file has columns `job_id`, `task_id`, `geo_value`, `disease`, `model`, `_draw`, `_chain`, `_iteration`, `_variable`, `value`, and `reference_date`. These variables follow the [{tidybayes}](https://mjskay.github.io/tidybayes/articles/tidybayes.html) specification.