Skip to content

Scheduled Screenshot #322

Scheduled Screenshot

Scheduled Screenshot #322

Workflow file for this run

name: Scheduled Screenshot
on:
# Schedule daily updates
schedule: [{cron: "0 0 * * *"}]
# (optional) Run workflow manually
workflow_dispatch:
# (optional) Run workflow when pushing on master/main
push: {branches: ["master", "main"]}
jobs:
screenshot:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 16
- name: Install dependencies
run: npm install
- name: Take and save screenshot
run: node index.js
- name: Commit and push changes
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add snapshot.png
git commit -a -m "Update snapshot"
git push -f origin main