Skip to content

Update README.md

Update README.md #25

name: R script workflow
on: [push]
jobs:
run_r_script:
runs-on: ubuntu-latest
container:
image: minhajuddin2510/rcode_files_update:latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: test
- name: Ensure workspace directory exists
run: |
mkdir -p /github/workspace/
- name: Decode Google Sheets token
env:
GSHEET_TOKEN: ${{ secrets.GSHEET_TOKEN }}
run: |
echo "$GSHEET_TOKEN" | base64 -d > /github/workspace/gargle-oauth
- name: Install system dependencies for R packages
run: |
apt-get install -y libudunits2-dev libproj-dev
- name: Run R script
run: Rscript boerne-water-supply/rcode/use1_demand_data.R
- name: Commit and push if changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add *.csv
git commit -m "Update data file" || echo "No changes to commit"
git push