Keep TreeGrid blog tweet under limit #1802
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: Rebuild website | |
| on: | |
| push: | |
| paths: | |
| - 'www/**' | |
| branches: | |
| - '**' | |
| workflow_call: | |
| issues: | |
| types: [opened, edited, milestoned, closed] | |
| label: | |
| types: [created, edited, deleted] | |
| # workflow_run: | |
| # # when the "RELEASE" workflow is completed successfully, we need to react and run this workflow | |
| # workflows: [RELEASE] | |
| # types: [completed] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref_name }} | |
| cancel-in-progress: true | |
| jobs: | |
| publish-website: | |
| runs-on: ubuntu-latest | |
| env: | |
| NEXT_PUBLIC_BASE_URL: https://data.infinite-table.com | |
| GITHUB_PAT: ${{ secrets.DEPLOY_GITHUB_TOKEN }} | |
| READ_GITHUB_ISSUES_TOKEN: ${{ secrets.READ_GITHUB_ISSUES_TOKEN }} | |
| NEXT_PUBLIC_INFINITE_LICENSE_KEY: ${{ secrets.NEXT_PUBLIC_INFINITE_LICENSE_KEY }} | |
| NEXT_PUBLIC_INFINITE_ALLOW_CANARY_IN_DOCS: ${{ secrets.NEXT_PUBLIC_INFINITE_ALLOW_CANARY_IN_DOCS }} | |
| NEXT_PUBLIC_PADDLE_SUBSCRIPTION_PLAIN_ID: ${{ secrets.NEXT_PUBLIC_PADDLE_SUBSCRIPTION_PLAIN_ID }} | |
| NEXT_PUBLIC_PADDLE_VENDOR_ID: ${{ secrets.NEXT_PUBLIC_PADDLE_VENDOR_ID }} | |
| NEXT_PUBLIC_PADDLE_VOLUME_DISCOUNT_TEST_3_LINK: ${{ secrets.NEXT_PUBLIC_PADDLE_VOLUME_DISCOUNT_TEST_3_LINK }} | |
| NEXT_PUBLIC_PADDLE_VOLUME_DISCOUNT_3_LINK: ${{ secrets.NEXT_PUBLIC_PADDLE_VOLUME_DISCOUNT_3_LINK }} | |
| NEXT_PUBLIC_PADDLE_VOLUME_DISCOUNT_TEST_5_LINK: ${{ secrets.NEXT_PUBLIC_PADDLE_VOLUME_DISCOUNT_TEST_5_LINK }} | |
| NEXT_PUBLIC_PADDLE_VOLUME_DISCOUNT_5_LINK: ${{ secrets.NEXT_PUBLIC_PADDLE_VOLUME_DISCOUNT_5_LINK }} | |
| NEXT_PUBLIC_PADDLE_VOLUME_DISCOUNT_TEST_10_LINK: ${{ secrets.NEXT_PUBLIC_PADDLE_VOLUME_DISCOUNT_TEST_10_LINK }} | |
| NEXT_PUBLIC_PADDLE_VOLUME_DISCOUNT_10_LINK: ${{ secrets.NEXT_PUBLIC_PADDLE_VOLUME_DISCOUNT_10_LINK }} | |
| NEXT_PUBLIC_ALGOLIA_API_KEY: ${{ secrets.NEXT_PUBLIC_ALGOLIA_API_KEY }} | |
| NEXT_PUBLIC_ALGOLIA_APP_ID: ${{ secrets.NEXT_PUBLIC_ALGOLIA_APP_ID }} | |
| CONVERTKIT_FORM_ID: ${{ secrets.CONVERTKIT_FORM_ID }} | |
| CONVERTKIT_API_KEY: ${{ secrets.CONVERTKIT_API_KEY }} | |
| CONVERTKIT_TAG_ID: ${{ secrets.CONVERTKIT_TAG_ID }} | |
| strategy: | |
| matrix: | |
| node-version: [24.x] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| cache-dependency-path: | | |
| package-lock.json | |
| source/package-lock.json | |
| www/package-lock.json | |
| examples/package-lock.json | |
| - name: Install | |
| run: npm ci --force | |
| - name: Install source | |
| run: npm i --prefix source | |
| - name: Install www | |
| run: npm i --prefix www | |
| - name: 'Building' | |
| run: | | |
| npm run build:all | |
| - name: checkout infinite-www-dist repo | |
| uses: actions/checkout@v5 | |
| with: | |
| token: ${{ secrets.DEPLOY_GITHUB_TOKEN }} | |
| repository: infinite-table/infinite-www-dist | |
| path: infinite-www-dist | |
| ref: master | |
| - name: Copy netlify.toml | |
| run: cp ./netlify.toml ./infinite-www-dist | |
| - name: Replace old www folder with new one | |
| run: rm -fr ./infinite-www-dist/www && mv ./www ./infinite-www-dist | |
| - uses: './.github/actions/git-push-action' | |
| name: Push changes | |
| with: | |
| github_token: ${{ secrets.DEPLOY_GITHUB_TOKEN }} | |
| directory: infinite-www-dist | |
| repository: infinite-table/infinite-www-dist | |
| commit_message: ${{ github.event.head_commit.message }} | |
| branch: ${{github.ref_name}} | |
| # the dist repo is always checked out at master and its contents fully | |
| # replaced, so force-push to keep non-master preview branches in sync | |
| # (a plain push would be rejected as non-fast-forward on the 2nd build) | |
| force: true |