-
Notifications
You must be signed in to change notification settings - Fork 5
61 lines (49 loc) · 1.49 KB
/
build-dash.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
51
52
53
54
55
56
57
58
59
60
61
on:
push:
branches:
- main
schedule:
- cron: "03 13,16,19 * * MON-FRI"
workflow_dispatch:
name: build-dash
permissions:
contents: write
jobs:
build-dash:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
RENV_PATHS_ROOT: ~/.local/share/renv
steps:
- uses: actions/checkout@v3
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
version: pre-release
- uses: r-lib/actions/setup-r@v2
- name: Add Ubuntu dependencies
run: sudo apt-get install libglpk40
- uses: r-lib/actions/setup-renv@v2
- name: Cache targets data
uses: actions/cache@v3
with:
path: _targets
key: ${{ runner.os }}-targets-v1-${{ hashFiles('**/cache.log') }}
restore-keys: |
${{ runner.os }}-targets-v1-
- name: Build Pipeline and Dashboard
run: Rscript -e 'targets::tar_make()'
- name: Push Built Dashboard
run: |
git config --global user.name 'gha update bot'
git config --global user.email 'gadenbuie@users.noreply.github.com'
git add --all
git commit --allow-empty -m "[auto] Build Dashboard $(TZ=America/New_York date +'%Y-%m-%d %H:%M')"
git push
- name: Publish to Quarto Pub
uses: quarto-dev/quarto-actions/publish@v2
with:
target: quarto-pub
render: false
path: index.qmd
QUARTO_PUB_AUTH_TOKEN: ${{ secrets.QUARTO_PUB_AUTH_TOKEN }}