Closed felixhagspiel closed 1 year ago
I managed to fix it by installing sanity & running the command manually:
name: Backup Routine
on:
schedule:
# Runs at 04:00 UTC on the 1st and 17th of every month
- cron: "0 4 */16 * *"
workflow_dispatch:
jobs:
backup-dataset:
runs-on: ubuntu-18.04
name: Backup dataset
steps:
- uses: actions/checkout@v3
- name: Export Data
env:
SANITY_AUTH_TOKEN: ${{ secrets.SANITY_AUTH_TOKEN }}
run: |
npm install -g @sanity/cli
sanity install
SANITY_AUTH_TOKEN=$SANITY_AUTH_TOKEN sanity dataset export production backups/backup.tar.gz
- name: Upload backup.tar.gz
uses: actions/upload-artifact@v3
with:
name: backup-tarball
path: backups/backup.tar.gz
# Fails the workflow if no files are found; defaults to 'warn'
if-no-files-found: error
I have copied your example for the backup routine (thanks for that!). When I manually trigger the action via github, it fails on the
Export dataset
:this is my yaml file:
any ideas whats wrong? I have added a read only token as secret, and the only thing I have changed is
v0.2-alpha
->v0.4-alpha