-
Notifications
You must be signed in to change notification settings - Fork 3
55 lines (51 loc) · 1.7 KB
/
deploy-local-preview-bundle.yml
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
name: Deploy @fern-ui/local-preview-bundle
on:
workflow_dispatch: {}
pull_request: {}
push:
branches: [main]
tags: ["*"]
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: "buildwithfern"
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
GITHUB_TOKEN: ${{ secrets.FERN_GITHUB_TOKEN }}
jobs:
dev:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
container:
image: cimg/node:18.18.2
steps:
- uses: actions/checkout@v4
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-1
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Install
uses: ./.github/actions/install
- name: Build local preview bundle
run: |
pnpm compile
ENABLE_SOURCE_MAPS=true pnpm turbo --filter=@fern-ui/local-preview-bundle build
- name: Deploy local preview bundle
run: pnpm --filter=@fern-ui/cdk run deploy:dev2
prod:
runs-on: ubuntu-latest
if: github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/ui@')
container:
image: cimg/node:18.18.2
steps:
- uses: actions/checkout@v4
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-1
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Install
uses: ./.github/actions/install
- name: Build local preview bundle
run: pnpm turbo --filter=@fern-ui/local-preview-bundle build
- name: Deploy local preview bundle
run: pnpm --filter=@fern-ui/cdk run deploy:prod