feat: build and publish skills bundle to a Sanity dataset #134
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Validate skills | |
| run: npm run validate | |
| - name: Validate Cursor plugin | |
| run: npm run validate:cursor-plugin | |
| - name: Build skills bundle | |
| run: npm run build:bundle | |
| publish-bundle: | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| needs: validate | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build skills bundle | |
| run: npm run build:bundle | |
| - name: Publish bundle to Sanity | |
| env: | |
| SANITY_PROJECT_ID: ${{ secrets.SANITY_PROJECT_ID }} | |
| SANITY_DATASET: ${{ secrets.SANITY_DATASET }} | |
| SANITY_WRITE_TOKEN: ${{ secrets.SANITY_WRITE_TOKEN }} | |
| run: node scripts/publish-skills-bundle.mjs |