-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
93bdd94
commit cae2778
Showing
1 changed file
with
1 addition
and
29 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1 @@ | ||
name: Backup Routine | ||
on: | ||
schedule: | ||
# Runs at 10:00 UTC on every day-of-month divisible by 30 | ||
# .-------------- minute (0 - 59) | ||
# | .----------- hour (0 - 23) | ||
# | | .-------- day of month (1 - 31) | ||
# | | | .---- month (1 - 12) OR jan,feb,mar,apr ... | ||
# | | | | .-- day of week (0 - 6) (Sunday=0 or 7) | ||
# | | | | | OR sun,mon,tue,wed,thu,fri,sat | ||
# | | | | | | ||
# * * * * * user-name command to be executed | ||
- cron: "0 10 */30 * *" | ||
jobs: | ||
backup-dataset: | ||
runs-on: ubuntu-latest | ||
name: Backup dataset | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: npx @sanity/cli dataset export production backup.tar.gz | ||
working-directory: studio | ||
env: | ||
SANITY_STUDIO_API_PROJECT_ID: 2vfoxb3h | ||
SANITY_AUTH_TOKEN: ${{ secrets.SANITY_AUTH_TOKEN }} | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: production | ||
path: studio/backup.tar.gz | ||
retention-days: 5 | ||
|