Skip to content

Commit

Permalink
Add CI step to build CMS
Browse files Browse the repository at this point in the history
  • Loading branch information
0xAurelius committed Jan 13, 2025
1 parent 11ab85e commit 9c6a44e
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/build_cms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build Sanity CMS

on:
push:
paths:
- 'carbon-projects/**'
branches: "*"
pull_request:
paths:
- 'carbon-projects/**'
branches: "*"

jobs:
build:
runs-on: ubuntu-latest

defaults:
run:
working-directory: ./carbon-projects

strategy:
matrix:
node-version: [18.x]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: 'carbon-projects/package-lock.json' # Changed this line

- name: Install dependencies
run: npm ci

- name: Build Sanity studio
run: npm run build
env:
CI: true

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: sanity-build
path: carbon-projects/dist
retention-days: 7

0 comments on commit 9c6a44e

Please sign in to comment.