Skip to content

Backup CMS

Backup CMS #234

Workflow file for this run

name: Backup CMS
on:
schedule:
- cron: "0 3 * * 1,3,5" # Runs at 03:00 AM (UTC) every Monday, Wednesday, and Friday (Check https://crontab.guru/)
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18.12"
- run: npm install --dev
- run: npm run backup
env:
DATOCMS_BACKUP_TOKEN: ${{ secrets.DATOCMS_BACKUP_TOKEN }}
- uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: master
commit_message: "Automated CMS backup"
commit_user_name: Automated Backups
commit_author: Automated Backups <actions@github.com>