Update use1_demand_data.R #30
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 workflow | |
on: [push] | |
jobs: | |
run_r_script: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
ref: test | |
- name: Setup R | |
uses: r-lib/actions/setup-r@v2 | |
- name: Decode Google Sheets token | |
env: | |
GSHEET_TOKEN: ${{ secrets.GSHEET_TOKEN }} | |
run: | | |
echo "$GSHEET_TOKEN" | base64 -d > gargle-oauth | |
- name: Install dependencies | |
run: Rscript boerne-water-supply/rcode/global0_set_apis_libraries.R | |
- 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 |