diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6ceb9e2..6505f55 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,4 +1,4 @@ -name: append daily CI data +name: Deploy to shinyapps.io on: push jobs: diff --git a/.github/workflows/schedule.yml b/.github/workflows/schedule.yml index c2e2eca..1849de9 100644 --- a/.github/workflows/schedule.yml +++ b/.github/workflows/schedule.yml @@ -16,3 +16,14 @@ jobs: - name: Update data run: | bash ./data-raw/update-data.sh + - name: Commit files + run: | + git config --global user.name 'Kasia' + git config --global user.email 'katarzyna.kulma@gmail.com' + git add data/* + git commit -m "Auto update of the daily data" + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: main diff --git a/data-raw/update-data.sh b/data-raw/update-data.sh index 07bdf14..26d9460 100644 --- a/data-raw/update-data.sh +++ b/data-raw/update-data.sh @@ -3,14 +3,3 @@ Rscript -e "source('data-raw/update-data.R')" -if [[ "$(git status --porcelain)" != "" ]]; then - git config --global user.name 'Kasia' - git config --global user.email 'katarzyna.kulma@gmail.com' - git add data/* - git commit -m "Auto update of the daily data" - git push origin main -else -echo "Nothing to commit..." -fi - -