-
Notifications
You must be signed in to change notification settings - Fork 20
69 lines (56 loc) · 1.74 KB
/
chapters-merge.yaml
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
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