Update deploy-sanity.yml #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy sanity studio | |
'on': | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
name: Build and deploy | |
runs-on: ubuntu-latest | |
env: | |
SANITY_AUTH_TOKEN: '${{ secrets.SANITY_DEPLOY_TOKEN }}' | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 16.x | |
- name: "Restore cached Node Modules \U0001F4BE" | |
id: cache-node-modules | |
uses: actions/cache@v3 | |
with: | |
path: ./sanity/node_modules | |
key: 'node-modules-${{ hashFiles(''package-lock.json'') }}' | |
- name: Install dependencies | |
working-directory: ./sanity | |
run: npm install | |
- name: Deploy Studio | |
working-directory: ./sanity | |
run: npm run deploy |