-
Notifications
You must be signed in to change notification settings - Fork 6
50 lines (50 loc) · 1.38 KB
/
blog.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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/setup-micromamba@v1
with:
environment-file: environment.yml
micromamba-version: latest
log-level: debug
cache-environment: true
- name: Install R dependencies
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
run: |
Rscript ./dependencies.R
- name: Restore Blogdown Cache
uses: actions/cache@v4.0.2
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@v4
with:
name: blog
path: |
./content/blog
./static/blog