R script Karup 1 #15742
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |