chore: Replace demo app with Docusaurus docs site #4
Workflow file for this run
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: Preview Deploy | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| jobs: | |
| deploy-preview: | |
| name: Deploy Preview | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| deployments: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.node-version' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build library | |
| run: npm run build:lib | |
| - name: Build website | |
| run: npx nx run website:build | |
| env: | |
| SITE_BASE_URL: / | |
| - name: Deploy to Cloudflare Pages | |
| id: deploy | |
| uses: cloudflare/wrangler-action@v3 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| command: pages deploy apps/website/build --project-name=react-mosaic --branch=pr-${{ github.event.pull_request.number }} | |
| - name: Update PR comment | |
| uses: marocchino/sticky-pull-request-comment@v2 | |
| with: | |
| header: preview-deploy | |
| message: | | |
| ## Preview Deployment | |
| | | | | |
| |---|---| | |
| | **Status** | Deployed | | |
| | **URL** | ${{ steps.deploy.outputs.deployment-url }} | | |
| | **Commit** | ${{ github.sha }} | |