Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
gurdenbatra authored Apr 2, 2024
1 parent 93bdd94 commit cae2778
Showing 1 changed file with 1 addition and 29 deletions.
30 changes: 1 addition & 29 deletions .github/workflows/main.yml
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

0 comments on commit cae2778

Please sign in to comment.