Skip to content

feat: add better clean up and cancel workflow (#91) #21

feat: add better clean up and cancel workflow (#91)

feat: add better clean up and cancel workflow (#91) #21

Workflow file for this run

name: Sanity Deploy Workflow
on:
push:
branches: [main]
paths: ["studio/**"]
jobs:
sanity-deploy:
runs-on: ubuntu-latest
name: Deploy Sanity
environment: Sanity Production
defaults:
run:
working-directory: ./studio
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Cache pnpm store
uses: actions/cache@v4
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('studio/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Install Packages
run: pnpm install
- name: Deploy Sanity
run: pnpm run deploy
env:
SANITY_AUTH_TOKEN: ${{ secrets.SANITY_AUTH_TOKEN }}
SANITY_STUDIO_PROJECT_ID: ${{ secrets.SANITY_STUDIO_PROJECT_ID }}
SANITY_STUDIO_DATASET: ${{ secrets.SANITY_STUDIO_DATASET }}
SANITY_STUDIO_PREVIEW_URL: ${{ secrets.SANITY_STUDIO_PREVIEW_URL }}
SANITY_STUDIO_APP_BASE_URL: ${{ secrets.SANITY_STUDIO_APP_BASE_URL }}
SANITY_STUDIO_APP_API_TOKEN: ${{ secrets.SANITY_STUDIO_APP_API_TOKEN }}
SANITY_STUDIO_SUPABASE_URL: ${{ secrets.SANITY_STUDIO_SUPABASE_URL }}
SANITY_STUDIO_SUPABASE_KEY: ${{ secrets.SANITY_STUDIO_SUPABASE_KEY }}
SANITY_STUDIO_SLACK_HOOK: ${{ secrets.SANITY_STUDIO_SLACK_HOOK }}