Publish shared packages before Pro docs install #106
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: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| - next | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Setup Node | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci --ignore-scripts | |
| - name: Install Pro docs package | |
| env: | |
| CHART_KIT_PRO_NPM_TOKEN: ${{ secrets.CHART_KIT_PRO_NPM_TOKEN }} | |
| run: | | |
| if [ -z "$CHART_KIT_PRO_NPM_TOKEN" ]; then | |
| echo "Skipping Pro docs package install because CHART_KIT_PRO_NPM_TOKEN is unavailable." | |
| echo "CHART_KIT_PRO_DOCS_READY=false" >> "$GITHUB_ENV" | |
| exit 0 | |
| fi | |
| npm config set //registry.npmjs.org/:_authToken "$CHART_KIT_PRO_NPM_TOKEN" | |
| npm install --no-save --package-lock=false --ignore-scripts @chart-kit/pro | |
| echo "CHART_KIT_PRO_DOCS_READY=true" >> "$GITHUB_ENV" | |
| - name: Lint | |
| run: npm run lint | |
| - name: Security audit | |
| run: npm run security:audit | |
| - name: Typecheck | |
| run: npm run typecheck | |
| - name: Test | |
| run: npm run test | |
| - name: Surface | |
| run: npm run surface:check | |
| - name: Docs | |
| if: env.CHART_KIT_PRO_DOCS_READY == 'true' | |
| run: npm run docs:build | |
| - name: React Native CLI example | |
| run: npm run example:rn-cli:typecheck | |
| - name: Benchmark | |
| run: npm run benchmark | |
| - name: Build | |
| run: npm run build |