-
Notifications
You must be signed in to change notification settings - Fork 8
47 lines (36 loc) · 1.23 KB
/
cd.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
name: "Deploy the website to Vercel"
on:
workflow_dispatch:
push:
branches:
- "main"
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
jobs:
cd:
runs-on: "ubuntu-latest"
steps:
- name: "Check out the repo"
uses: "actions/checkout@v3"
- name: "Install Bun"
uses: "oven-sh/setup-bun@v1"
- name: "Install the dependencies"
run: "bun install --frozen-lockfile"
- name: "Lint the code"
run: "bun run check"
- name: "Pull Vercel environment information"
run: "bun vercel pull --environment=production --token=$VERCEL_TOKEN --yes"
- name: "Build the website"
run: "bun vercel build --prod --token=$VERCEL_TOKEN"
- name: "Add build summary"
run: |
echo "## Build results" >> $GITHUB_STEP_SUMMARY
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
- name: "Deploy the website to Vercel"
run: "bun vercel deploy --prebuilt --prod --token=$VERCEL_TOKEN"
- name: "Add deploy summary"
run: |
echo "## Deploy results" >> $GITHUB_STEP_SUMMARY
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY