Skip to content

Commit

Permalink
feat: auto deploy sanity
Browse files Browse the repository at this point in the history
  • Loading branch information
p5quared committed Nov 25, 2024
1 parent c64857c commit 4790313
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/deploy-sanity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Deploy Sanity Studio
on:
push:
branches: [master, ci]
# paths:
# - 'studio/**' # Only trigger on changes to studio files
workflow_dispatch: # Allow manual triggering

env:
SANITY_AUTH_TOKEN: ${{ secrets.SANITY_DEPLOY }}

jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./studio # Set default working directory to studio folder
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build Sanity Studio
run: pnpm build

- name: Deploy Sanity Studio
run: pnpm run deploy

0 comments on commit 4790313

Please sign in to comment.