Skip to content

Generate map data

Generate map data #3

on:
workflow_dispatch:
schedule:
- cron: '23 2 * * 2'
name: 'Generate map data'
jobs:
fetch-data:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
needs: data
- name: Update data
env:
EMBEDDINGS_LOCATION: ${{ secrets.EMBEDDINGS_LOCATION }}
run: |
source("data-raw/json_map.R")
shell: Rscript {0}
- name: Commit latest data
run: |
git config user.email "action@github.com"
git config user.name "GitHub Actions"
git add inst/extdata/map_data.json
git commit -m "Fetch map data"
git pull --rebase origin main
git push
echo "pushed to github"
trigger-deploy:
needs: fetch-data
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.EPIVERSE_CONNECT_PAT }}
steps:
- uses: actions/checkout@v4
- name: Trigger re-deploy of the front-end
run: |
gh workflow run auto-deploy-pages.yml --repo epiverse-connect/epiverse-search-frontend