Skip to content

Update files

Update files #573

Workflow file for this run

name: 'Update files'
on:
schedule:
- cron: '00 01 * * *'
push:
branches:
- base
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install dependencies
run: npm install
- name: Update files
run: node app.js
- name: Commit files
run: |
git clone https://github.com/AmericanRedCross/google-sheets-workaround --branch gh-pages --single-branch gh-pages
cp -r files/* gh-pages/
cd gh-pages
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update files to match" -a || true
# The above command will fail if no changes were present, so we ignore that.
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: gh-pages
directory: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}