From 338f0ec947084f5201b68d1be7c55bd0169e07d0 Mon Sep 17 00:00:00 2001 From: "George G. Vega Yon" Date: Fri, 25 Oct 2024 07:34:22 -0600 Subject: [PATCH] Adding action to post artifact (#90) * Adding action to post artifact * Forgot to add path * Forgot to update news * Fixing enum --- .github/workflows/pkgdown.yaml | 16 ++++++++++++++++ NEWS.md | 1 + README.md | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index cee6d2e3..6265f6a6 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,21 @@ 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 + path: ./docs + 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 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. 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.