Skip to content

Merge chapters and meetup #939

Merge chapters and meetup

Merge chapters and meetup #939

name: "Merge chapters and meetup"
on:
workflow_dispatch:
push:
paths:
- 'data/chapters/'
schedule:
- cron: "10 */12 * * *"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
merge:
name: Merge chapters and meetup
runs-on: ubuntu-latest
env:
RENV_PROFILE: "dev"
RENV_CONFIG_SANDBOX_ENABLED: FALSE
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Install cURL Headers
run: |
sudo apt-get update
sudo apt-get install libcurl4-openssl-dev
- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
r-version: '4.3.0'
- name: Setup Renv
uses: r-lib/actions/setup-renv@v2
- name: Site data - Meetup
uses: actions/checkout@v4
with:
repository: rladies/meetup_archive
ssh-key: ${{ secrets.MEETUP_ARCHIVE_KEY}}
path: tmpd/mtp
- name: Site data - clean cloned repos
run: |
cp -r tmpd/mtp/data/* data/meetup/
rm -rf tmpd
- name: Site data - merge chapter and meetup
run: Rscript --verbose scripts/get_chapters.R
- name: Commit data
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git add -f data/chapters_meetup.json
git commit -m 'Update chapters data' || echo "No new data to commit"
- name: Pushing to the protected branch 'main'
uses: CasperWA/push-protected@v2
with:
token: ${{ secrets.GLOBAL_GHA_PAT }}
branch: main