-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (90 loc) · 3.02 KB
/
hacim.yml
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: build_vdh_dashboard
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
generate-dashboard:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
pages: write
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
RENV_PATHS_ROOT: ~/.local/share/renv
steps:
# Downloading both the repositories to simulate the original task
- uses: actions/checkout@main
with:
path: 'parent/${{ github.event.repository.name }}'
- uses: actions/checkout@main
with:
repository: uva-bi-sdad/social_data_commons
path: 'parent/social_data_commons'
- name: Run tree
run: |
tree ..
- name: Cache packages
uses: actions/cache@v3
with:
path: ${{ env.RENV_PATHS_ROOT }}
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }}
restore-keys: |
${{ runner.os }}-renv-
- uses: r-lib/actions/setup-r@v2
- name: Cache downloaded repositories
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/parent/social_data_commons/repos
key: ${{ runner.os }}-repos
restore-keys: |
${{ runner.os }}-repos
- run: echo "💡 The ${{ github.repository }} repository have been cloned to the runner."
- name: Set up "data commons"
working-directory: ${{ github.workspace }}/parent/social_data_commons
shell: Rscript {0}
run: |
if (!requireNamespace("renv", quietly = TRUE)) install.packages("renv")
renv::init()
renv::restore()
install.packages('remotes')
remotes::install_github('uva-bi-sdad/community')
source("build.R")
renv::snapshot()
- name: build ${{ github.event.repository.name }}
working-directory: ${{ github.workspace }}/parent/${{ github.event.repository.name }}
shell: Rscript {0}
run: |
if (!requireNamespace("renv", quietly = TRUE)) install.packages("renv")
renv::init()
renv::restore()
install.packages('remotes')
remotes::install_github('uva-bi-sdad/community')
source("build.R")
renv::snapshot()
- name: List files
run: |
ls -la
# - name: Commit files # Commit changes
# working-directory: parent/${{ github.event.repository.name }}
# run: |
# ls -la
# git config --local user.email "[email protected]"
# git config --local user.name "GitHub Actions"
# git add -A
# git commit -m "generating dashboard"
# git push
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
# Upload entire repository
path: 'parent/${{ github.event.repository.name }}/docs'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2