Skip to content

get_ennet_topics #21533

get_ennet_topics

get_ennet_topics #21533

name: get_ennet_topics
on:
schedule:
- cron: "0 * * * *"
jobs:
get_ennet_topics:
runs-on: ubuntu-latest
container: rocker/tidyverse:4.2.1
steps:
- uses: actions/checkout@v3
- name: Install system dependencies
run: |
apt-get update && apt-get install -y --no-install-recommends \
git-crypt libxt6 libglpk-dev
- name: Trust git repo
run: |
git config --global --add safe.directory /__w/ennet_db/ennet_db
- name: Install packages from renv.lock (with cache)
if: ${{ !env.ACT }}
uses: r-lib/actions/setup-renv@v2
with:
cache-version: 2
- name: Install packages from renv.lock (local, no cache)
if: ${{ env.ACT }}
run: |
renv::restore()
shell: Rscript {0}
- name: Get en-net topics
run: |
targets::tar_make(hourly_topics_csv)
targets::tar_make(daily_topics_csv)
targets::tar_make(monthly_topics_csv)
shell: Rscript {0}
# - name: Process en-net interactions
# run: |
# targets::tar_make(daily_interactions_csv)
# targets::tar_make(weekly_interactions_csv)
# targets::tar_make(monthly_interactions_csv)
# targets::tar_make(yearly_interactions_csv)
# shell: Rscript {0}
# - name: Get en-net discussions
# run: |
# targets::tar_make(discussions_csv)
# shell: Rscript {0}
- name: Commit and push files
run: |
git config --global user.email "[email protected]"
git config --global user.name "ernestguevarra"
git add .
git diff-index --quiet HEAD || git commit -m "process ennet topics"
git push