Treat Pro as public licensed package #7
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: Site | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - master | |
| - next | |
| paths: | |
| - ".github/workflows/site.yml" | |
| - "apps/site/**" | |
| - "docs/**" | |
| - "packages/**" | |
| - "package-lock.json" | |
| - "package.json" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| deployments: write | |
| 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 | |
| run: | | |
| PACKAGE_VERSION=$(node -p "require('./package.json').version") | |
| npm install --no-save --package-lock=false --ignore-scripts "@chart-kit/pro@${PACKAGE_VERSION}" | |
| echo "CHART_KIT_PRO_DOCS=true" >> "$GITHUB_ENV" | |
| - name: Build site | |
| run: npm run site:build | |
| - name: Deploy to Cloudflare Pages | |
| id: cloudflare-pages | |
| uses: cloudflare/wrangler-action@v3 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| wranglerVersion: "4" | |
| command: pages deploy apps/site/dist --project-name=chartkit-io --branch=${{ github.ref_name }} | |
| gitHubToken: ${{ secrets.GITHUB_TOKEN }} |