-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (40 loc) · 1.57 KB
/
update-abs-check.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
# Check every day at 11:10am Adelaide/Australia for updated ABS data
name: update-abs-check
on:
pull_request:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
update-data:
runs-on: macOS-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-pandoc@v2
- name: Homebrew setup
run: |
brew install pkg-config
brew install gdal proj geos
- name: Install packages
env:
GITHUB_PAT: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
run: |
Rscript -e "install.packages(c('remotes', 'devtools', 'rmarkdown', 'lazyeval', 'sf'))"
Rscript -e "remotes::install_github('aiti-flinders/aitidata')"
- name: Get data
run: |
Rscript -e "library(aitidata)"
Rscript -e "aitidata:::update_abs()"
Rscript -e "devtools::document()"
- name: Render README
run: |
Rscript -e "rmarkdown::render(here::here('README.Rmd'))"
- name: Commit
run: |
git config --global user.name 'Hamish Gamble'
git config --global user.email 'gamb0043@flinders.edu.au'
git add .
git commit -m 'Scheduled data updates' || echo "No changes to commit"
Rscript -e "usethis::use_version(which = 'patch')"
git push || echo "No changes to commit"