[ci] release #10
This file contains 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 to GitHub Pages | |
on: | |
pull_request: | |
types: [closed] | |
branches: | |
- main | |
workflow_dispatch: # Adds the manual trigger | |
permissions: | |
id-token: write | |
contents: write | |
pages: write | |
jobs: | |
deploy: | |
if: github.event_name == 'workflow_dispatch' || (github.event.pull_request.merged == true && github.event.pull_request.user.login == 'github-actions[bot]') | |
runs-on: ubuntu-latest | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Checkout code repository | |
uses: actions/checkout@v4 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Cache turbo build setup | |
uses: actions/cache@v4 | |
with: | |
path: .turbo | |
key: ${{ runner.os }}-turbo-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-turbo- | |
- name: Build | |
run: pnpm run build --filter="./apps/*" | |
- name: Merge apps build outputs | |
run: mv apps/playground/dist apps/docs/dist/playground | |
- name: Upload Pages Artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: "apps/docs/dist/" | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |