Skip to content

Commit

Permalink
using sanity action for github
Browse files Browse the repository at this point in the history
  • Loading branch information
tmanundercover committed Nov 6, 2023
1 parent 828e098 commit 104617c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/sanity-backup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 16

- name: Install dependencies
run: |
cd sanityIo
Expand All @@ -26,9 +27,15 @@ jobs:
cat << EOF > .env.production
EOF
# Make sure to add a secret for SANITY_AUTH_TOKEN
SANITY_AUTH_TOKEN="${{ secrets.SANITY_AUTH_TOKEN }}" npx @sanity/cli dataset export production backups/backup.tar.gz
SANITY_AUTH_TOKEN="${{ secrets.SANITY_AUTH_TOKEN }}"
- name: Export dataset
uses: sanity-io/github-action-sanity@v0.1-alpha
env:
SANITY_AUTH_TOKEN: ${{ secrets.SANITY_AUTH_TOKEN }}
with:
args: dataset export production backups/backup.tar.gz
- name: Upload backup.tar.gz
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v2
with:
name: backup-tarball
path: sanityIo/backups/backup.tar.gz
Expand Down

0 comments on commit 104617c

Please sign in to comment.