Skip to content

Deploy Sanity action #4

Deploy Sanity action

Deploy Sanity action #4

Workflow file for this run

name: Deploy Sanity action
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
cache: npm
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Deploy Sanity Studio
env:
SANITY_AUTH_TOKEN: ${{ secrets.SANITY_AUTH_TOKEN }}
SANITY_STUDIO_PROJECT_ID: ${{ secrets.SANITY_STUDIO_PROJECT_ID }}
SANITY_STUDIO_DATASET: ${{ secrets.SANITY_STUDIO_DATASET }}
run: |
npm install -g @sanity/cli
sanity login --non-interactive --token $SANITY_AUTH_TOKEN
sanity deploy --non-interactive