Backup CMS #227
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 * * 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> |