diff --git a/.github/workflows/blog.yaml b/.github/workflows/blog.yaml index 351d4bcbb..8c26950b5 100644 --- a/.github/workflows/blog.yaml +++ b/.github/workflows/blog.yaml @@ -1,5 +1,4 @@ name: blog - on: push: paths: # run only when an Rmd file changes @@ -8,48 +7,30 @@ on: - "dependencies.R" - ".github/workflows/blog.yaml" workflow_dispatch: - jobs: blog: runs-on: ubuntu-latest defaults: run: shell: bash -l {0} - env: - RETICULATE_PYTHON: /usr/share/miniconda3/envs/www-main/bin/python steps: - uses: actions/checkout@v3 with: - # submodules: true # Fetch Hugo themes (true OR recursive) fetch-depth: 3 - - uses: conda-incubator/setup-miniconda@v2 + - uses: mamba-org/provision-with-micromamba@v15 with: - python-version: 3.9 - activate-environment: www-main - miniforge-variant: Mambaforge - miniforge-version: latest - use-mamba: true - use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly! + environment-file: environment.yml + micromamba-version: latest - name: Get Date id: get-date run: echo "name=today::$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT shell: bash - - name: Cache Conda env - uses: actions/cache@v3 - with: - path: ${{ env.CONDA }}/envs - key: conda-${{ runner.os }}--${{ runner.arch }}--${{ steps.get-date.outputs.today }}-${{ hashFiles('environment.yml') }}-${{ env.CACHE_NUMBER }} - env: - # Increase this value to reset cache if etc/example-environment.yml has not changed - CACHE_NUMBER: 0 - id: cache - - name: Update environment - run: mamba env update -n www-main -f environment.yml - if: steps.cache.outputs.cache-hit != 'true' - - name: Conda info + - name: Create environment + run: micromamba env create -n www-main-micromamba -f environment.yml + - name: micromamba info run: | - conda info - conda list + micromamba info + micromamba list - name: Install R dependencies env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} @@ -72,23 +53,4 @@ jobs: name: blog path: | ./content/blog - ./static/blog - - - uses: actions/setup-node@v3 - with: - node-version: 16 - - uses: actions/cache@v3.0.2 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- - - run: npm ci - - name: Lint - run: npm run lint - - name: Build - run: npm run build - - uses: actions/upload-artifact@v3 - with: - name: website - path: ./public + ./static/blog \ No newline at end of file diff --git a/content/blog/2020-08-26-fb-survey.Rmd b/content/blog/2020-08-26-fb-survey.Rmd index 678ece683..eab3f82d5 100644 --- a/content/blog/2020-08-26-fb-survey.Rmd +++ b/content/blog/2020-08-26-fb-survey.Rmd @@ -47,6 +47,10 @@ output: toc: true --- +```{r, echo=FALSE} +options(covidcast.auth = "9328d11cfe46d") # Minh's key +``` + Since April 2020, in collaboration with Facebook, partner universities, and public health officials, we've been conducting a massive daily survey to monitor diff --git a/content/blog/2020-10-06-survey-wave-4.Rmd b/content/blog/2020-10-06-survey-wave-4.Rmd index bc7c1c56d..5243dc136 100644 --- a/content/blog/2020-10-06-survey-wave-4.Rmd +++ b/content/blog/2020-10-06-survey-wave-4.Rmd @@ -30,7 +30,9 @@ output: blogdown::html_page: toc: true --- - +```{r, echo=FALSE} +options(covidcast.auth = "9328d11cfe46d") # Minh's key +``` Beginning in early April 2020, the `r blogdown::shortcode_html("reflink", "/", "Delphi group")` has conducted a major survey to track COVID-19 across the United States. With the support of Facebook Data for Good, we have been able to recruit tens of diff --git a/content/blog/2020-10-14-dv-signal.Rmd b/content/blog/2020-10-14-dv-signal.Rmd index ac2cd4e89..50681d896 100644 --- a/content/blog/2020-10-14-dv-signal.Rmd +++ b/content/blog/2020-10-14-dv-signal.Rmd @@ -75,6 +75,7 @@ library(covidcast) library(dplyr) library(ggplot2) library(gridExtra) +options(covidcast.auth = "9328d11cfe46d") # Minh's key # Fetch DV % CLI signal and USAFacts confirmed case incidence proportion at # the state level diff --git a/content/blog/2020-12-10-masks-public.Rmd b/content/blog/2020-12-10-masks-public.Rmd index ec4480ab8..eb51e4d26 100644 --- a/content/blog/2020-12-10-masks-public.Rmd +++ b/content/blog/2020-12-10-masks-public.Rmd @@ -21,6 +21,10 @@ output: toc: true --- +```{r, echo=FALSE} +options(covidcast.auth = "9328d11cfe46d") # Minh's key +``` + As COVID cases and deaths continue to rise in the United States, we are repeatedly reminded that unless we take the appropriate precautions---by wearing masks when around other people, working from home whenever possible, and diff --git a/content/blog/2021-01-15-causal-effect-mobility.Rmd b/content/blog/2021-01-15-causal-effect-mobility.Rmd index d6e4ae090..4b13265ac 100644 --- a/content/blog/2021-01-15-causal-effect-mobility.Rmd +++ b/content/blog/2021-01-15-causal-effect-mobility.Rmd @@ -27,6 +27,10 @@ output: toc: true --- +```{r, echo=FALSE} +options(covidcast.auth = "9328d11cfe46d") # Minh's key +``` + ```{r setup, include=FALSE} knitr::opts_chunk$set(collapse = TRUE) ``` diff --git a/content/blog/2021-01-22-holiday-surveys.Rmd b/content/blog/2021-01-22-holiday-surveys.Rmd index 87952ef1e..e6d44a4bc 100644 --- a/content/blog/2021-01-22-holiday-surveys.Rmd +++ b/content/blog/2021-01-22-holiday-surveys.Rmd @@ -29,7 +29,9 @@ output: blogdown::html_page: toc: true --- - +```{r, echo=FALSE} +options(covidcast.auth = "9328d11cfe46d") # Minh's key +``` With pandemic fatigue setting in across the United States after a long year filled with uncertainty, many felt the temptation to celebrate a “normal” Thanksgiving and Christmas. However, with cases steeply rising across the US,