-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (58 loc) · 1.83 KB
/
get_meetup_data.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: Get meetup data
on:
pull_request:
branches:
- main
push:
branches:
- main
schedule:
- cron: "0 */12 * * *"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
meetup:
name: Update meetup data
runs-on: ubuntu-latest
env:
MEETUPR_PWD: ${{ secrets.MEETUPR_PWD }}
RENV_PATHS_ROOT: ~/.local/share/renv
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install cURL Headers
run: |
sudo apt-get update
sudo apt-get install libcurl4-openssl-dev libsodium-dev
- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
r-version: '4.2.0'
- name: Cache packages
uses: actions/cache@v2
with:
path: ${{ env.RENV_PATHS_ROOT }}
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }}
restore-keys: |
${{ runner.os }}-renv-
- name: Restore packages
shell: Rscript {0}
run: |
if (!requireNamespace("renv", quietly = TRUE))
install.packages("renv")
renv::restore()
- name: Meetup authentication
run: Rscript scripts/meetup_auth.R
- name: Update chapter data
run: Rscript scripts/get_chapters.R
- name: Update event data
run: Rscript scripts/get_events.R
- name: Commit data
if: github.event_name == 'schedule' || github.event_name == 'push'
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git add data/
git commit -m 'Update meetup data' || echo "No meetup data to commit"
git push || echo "Nothing to push"