feat: fumadocs - v4 #5
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 PR previews | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| - closed | |
| issue_comment: | |
| types: [created] | |
| concurrency: preview-${{ github.ref }} | |
| jobs: | |
| deploy-preview: | |
| runs-on: ubuntu-latest | |
| if: github.event.action != 'closed' || (github.event.issue.pull_request && contains(github.event.comment.body, '/preview')) | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Checkout Pull Request | |
| if: github.event.issue.pull_request && contains(github.event.comment.body, '/preview') | |
| run: gh pr checkout ${{ github.event.issue.number }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Cache bun dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.bun/install/cache | |
| key: ${{ runner.os }}-bun-web-${{ hashFiles('bun.lockb') }} | |
| restore-keys: | | |
| ${{ runner.os }}-bun-web- | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Build website | |
| run: bun run build | |
| - name: Deploy preview | |
| uses: rossjrw/pr-preview-action@v1 | |
| with: | |
| source-dir: ./build/ |