-
Notifications
You must be signed in to change notification settings - Fork 4
58 lines (48 loc) · 1.43 KB
/
deploy-pages.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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