From 2d7c9df1c5c566ee920413436f4140a20601d3b7 Mon Sep 17 00:00:00 2001 From: Jeremia Kimelman Date: Wed, 18 Sep 2024 01:07:26 -0700 Subject: [PATCH] Add github workfow --- .github/workflows/run.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/run.yml diff --git a/.github/workflows/run.yml b/.github/workflows/run.yml new file mode 100644 index 0000000..314fae4 --- /dev/null +++ b/.github/workflows/run.yml @@ -0,0 +1,29 @@ +name: Update behested payments + +on: + workflow_dispatch: + schedule: + - cron: '0 0 1 * *' + +jobs: + run: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: '20' + - name: Install Node dependencies + run: npm install + - name: Run scripts + run: node scrape.mjs + - name: Commit and push if it changed + run: |- + git config user.name "Automated" + git config user.email "actions@users.noreply.github.com" + git pull + git add behested.csv + timestamp=$(date -u) + git commit -m "Latest data: ${timestamp}" || exit 0 + git push