Backup CMS #324
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Backup CMS | |
on: | |
schedule: | |
- cron: "0 3 * * 6" # Runs at 03:00 AM (UTC) every Saturday | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "18.16.1" | |
- 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> |