Skip to content

Update 2024-09-13-back-to-the-future.Rmd #335

Update 2024-09-13-back-to-the-future.Rmd

Update 2024-09-13-back-to-the-future.Rmd #335

Workflow file for this run

name: blog
on:
push:
paths: # run only when an Rmd file changes
- "**.Rmd"
- "environment.yml"
- "dependencies.R"
- ".github/workflows/blog.yaml"
workflow_dispatch:
jobs:
blog:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 3
- uses: mamba-org/provision-with-micromamba@v16
with:
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: Create environment
run: micromamba env create -n www-main-micromamba -f environment.yml
- name: micromamba info
run: |
micromamba info
micromamba list
- name: Install R dependencies
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
run: |
Rscript ./dependencies.R
- name: Restore Blogdown Cache
uses: actions/[email protected]
with:
path: |
./blogdown
key: ${{ runner.os }}-blogdown2-${{ hashFiles('environment.yml') }}-${{ hashFiles('content/blog/**.Rmd') }}
restore-keys: |
${{ runner.os }}-blogdown2-${{ hashFiles('environment.yml') }}-
${{ runner.os }}-blogdown2-
- name: Build site
env:
API_KEY: ${{ secrets.DELPHI_GITHUB_ACTIONS_EPIDATA_API_KEY }}
run: |
npm run build:blog
- uses: actions/upload-artifact@v3
with:
name: blog
path: |
./content/blog
./static/blog