Repository navigation
feat: katex implemented #11
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 Deployment | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| branches: [main] | |
| jobs: | |
| deploy-preview: | |
| runs-on: ubuntu-latest | |
| environment: production | |
| permissions: | |
| contents: read | |
| deployments: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Generate and Build | |
| run: | | |
| pnpm generate:data | |
| pnpm generate:og | |
| pnpm build | |
| env: | |
| NODE_VERSION: '22' | |
| - name: Deploy Preview to Cloudflare Pages | |
| id: preview | |
| uses: cloudflare/wrangler-action@v3 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| command: pages deploy dist --project-name=4byte-dev --branch=${{ github.head_ref }} | |
| gitHubToken: ${{ secrets.GITHUB_TOKEN }} | |
| wranglerVersion: '3' | |
| - name: Add or Update PR Comment | |
| uses: marocchino/sticky-pull-request-comment@v2 | |
| with: | |
| header: preview-url | |
| message: | | |
| **Preview Deployment is Ready!** | |
| You can test the updates in this PR in a live environment by clicking the link below: | |
| [View Preview](${{ steps.preview.outputs.deployment-url }}) | |
| *(This environment is specific to this PR and does not affect the `main` branch. The content at this link will update automatically when you push new commits to the PR.)* |