Interact rules urgent ssot fixes (#293) #220
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: Deploy Docs to GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: 24 | |
| registry-url: https://registry.npmjs.org | |
| - name: Enable Corepack | |
| run: | | |
| corepack enable | |
| corepack prepare yarn@4.10.3 --activate | |
| yarn set version 4.10.3 | |
| - name: Install dependencies | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| NPQ_PKG_MGR=yarn npx npq install | |
| - name: Build packages and landing page libs | |
| run: ./scripts/build-landing.sh | |
| - name: Build docs app | |
| run: yarn workspace @wix/interact-docs build | |
| env: | |
| # Set base path for GitHub Pages deployment (absolute path for React Router compatibility) | |
| VITE_BASE: /interact/docs/ | |
| - name: Build playground app | |
| run: yarn workspace @wix/interact-playground build | |
| env: | |
| VITE_BASE: /interact/playground/ | |
| - name: Setup Pages | |
| uses: actions/configure-pages@1f0c5cde4bc74cd7e1254d0cb4de8d49e9068c7d # v4 | |
| - name: Generate llms.txt files | |
| run: node scripts/generate-llms.mjs | |
| - name: Prepare deployment directory | |
| run: | | |
| # Create the site structure: | |
| # / -> landing page, examples page | |
| # /assets/ -> landing + examples assets (includes lib/ from build-landing.sh) | |
| # /docs/ -> docs app | |
| # /playground/ -> playground app | |
| # /rules/ -> rules markdown files | |
| # /llms.txt -> AI agent discovery index (llmstxt.org standard) | |
| # /llms-full.txt -> All rules concatenated for single-fetch consumption | |
| mkdir -p _site/docs | |
| mkdir -p _site/playground | |
| mkdir -p _site/rules | |
| mkdir -p _site/assets | |
| # Copy website app (landing page, examples page, assets) | |
| cp apps/website/index.html _site/ | |
| cp apps/website/examples.html _site/ | |
| cp -r apps/website/assets/* _site/assets/ | |
| # Copy docs app | |
| cp -r apps/docs/dist/* _site/docs/ | |
| # Copy playground app | |
| cp -r apps/playground/dist/* _site/playground/ | |
| # Copy rules from source (served at /rules/, not /docs/rules/) | |
| cp -r packages/interact/rules/* _site/rules/ | |
| # Copy generated llms.txt files | |
| cp llms.txt _site/llms.txt | |
| cp llms-full.txt _site/llms-full.txt | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4 | |
| with: | |
| path: _site | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4 |