Backup #213
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 | |
on: | |
schedule: | |
- cron: '0 10 */3 * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Install Sanity | |
run: npx @sanity/cli install | |
working-directory: cms | |
- name: Export data | |
run: npx @sanity/cli dataset export production production.tar.gz --overwrite | |
working-directory: cms | |
env: | |
SANITY_AUTH_TOKEN: ${{ secrets.SANITY_BACKUP_TOKEN_PRODUCTION }} | |
SANITY_STUDIO_API_PROJECT_ID: 5hlpazgd | |
- name: Store artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: production-dataset | |
path: cms/production.tar.gz | |
retention-days: 7 |