generated from relund/travisDeployR
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (49 loc) · 1.55 KB
/
run_script_karup1_ubuntu.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
name: R script Karup 1
on:
push:
paths:
- .github/workflows/run_script_karup1_ubuntu.yaml
- reports/karup/**
- reports/index.md
- script_karup1.R
- script_mv-lf.R
- functions.R
- renv.lock
schedule:
- cron: '30 * * * *' # every hour
# branches-ignore:
# - '**'
jobs:
render:
name: Run script for Karup river
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
GH_FTP: ${{ secrets.GH_FTP }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install pandoc
uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Install dependices
run: |
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get -y update
sudo apt-get install -y libgdal-dev libgeos-dev libproj-dev libsqlite3-dev
- uses: r-lib/actions/setup-renv@v2
- name: Run R script
run: Rscript --verbose script_karup1.R
- name: Run R script
run: Rscript --verbose script_mv-lf.R
- name: Commit results
run: |
git config user.email "junk@relund.dk"
git config user.name "Lars Relund"
git add \*.csv
git add \*.html
git commit --allow-empty -am 'gHA build: ${{github.run_number}}' || echo "No changes to commit"
git pull --rebase
git push origin || echo "No changes to commit"