-
Notifications
You must be signed in to change notification settings - Fork 108
60 lines (53 loc) · 1.71 KB
/
deploy.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
56
57
58
59
60
name: "Deploy"
on:
pull_request:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: pnpm/action-setup@v2
with:
version: 8.6.0
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"
- run: pnpm install
- run: pnpm build
- run: pnpm prepare-deploy
# deployment per branch
- uses: superactions/deploy-branch-action@action
if: ${{ github.ref != 'refs/heads/main' }}
with:
directory: packages/vscode-host/dist
# --- production deployments (only on main)
# deploy app
- uses: ngduc/vercel-deploy-action@master
if: ${{ github.ref == 'refs/heads/main' }}
with:
vercel-cli: vercel
vercel-project-id: ${{ secrets.VERCEL_APP_PROJECT_ID}}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID}}
vercel-token: ${{ secrets.VERCEL_TOKEN }}
scope: ${{ secrets.VERCEL_ORG_ID }}
working-directory: packages/vscode-host/dist
vercel-args: "--prod"
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
# deploy entrypoint (no preview)
- uses: ngduc/vercel-deploy-action@master
if: ${{ github.ref == 'refs/heads/main' }}
with:
vercel-cli: vercel
vercel-project-id: ${{ secrets.VERCEL_ENTRYPOINT_PROJECT_ID}}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID}}
vercel-token: ${{ secrets.VERCEL_TOKEN }}
scope: ${{ secrets.VERCEL_ORG_ID }}
working-directory: packages/entrypoint/dist
vercel-args: "--prod"
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true