Skip to content

Backup Routine

Backup Routine #28

Workflow file for this run

name: Backup Routine
on:
workflow_dispatch:
schedule:
# Runs at 04:00 UTC on the 1st and 17th of every month
- cron: "0 4 */16 * *"
jobs:
backup-production-dataset:
runs-on: ubuntu-20.04
name: Backup production dataset
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
yarn
- name: Export production dataset
run: |
SANITY_AUTH_TOKEN="${{ secrets.SANITY_VIEWER_TOKEN }}" \
npx sanity dataset export \
production backups/familie-endringslogg-production.tar.gz
- name: Upload familie-endringslogg-production.tar.gz
uses: actions/upload-artifact@v4
with:
name: Backup production dataset
path: backups/familie-endringslogg-production.tar.gz
# Fails the workflow if no files are found; defaults to 'warn'
if-no-files-found: error