-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
alan
committed
Feb 29, 2024
1 parent
674bfff
commit 5df6ca8
Showing
4 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
source("renv/activate.R") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: create renv_zip | ||
on: | ||
# schedule: | ||
# - cron: '0 21 * * 2,5' # Run on Tuesday and Friday 9pm UTC (5pm EST) | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
# Cacnel previous runs if a new push is sent | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
create-zip: | ||
# Don't run if a pull request but not closed | ||
if: github.event_name == 'schedule' || ((github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == 'true') || github.event_name == 'push') | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
contents: write | ||
pages: write | ||
steps: | ||
# Downloading both the repositories to simulate the original task | ||
- uses: actions/checkout@main | ||
with: | ||
path: ${{ github.event.repository.name }} | ||
- uses: r-lib/actions/setup-r@v2 | ||
- run: echo "💡 The ${{ github.repository }} repository have been cloned to the runner." | ||
- name: Set up "data commons environment" | ||
working-directory: ${{ github.workspace }}/${{ 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') | ||
renv::snapshot() | ||
- name: List files | ||
run: | | ||
ls -la | ||
- name: Save zip | ||
run: | | ||
zip -r renv.zip renv | ||
- name: Commit files # Commit changes. You need to do this so child sites work... | ||
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 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
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") | ||
# datacommons_view( | ||
# "../social_data_commons", "${{ github.event.repository.name }}", | ||
# metadata = entities, entity_info = NULL | ||
# ) | ||
renv::snapshot() |