-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (38 loc) · 1 KB
/
release.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
name: Build and Deploy
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Check if repository is a fork
run: |
if [ "${{ github.repository_owner }}" != "a4arpon" ]; then
echo "This is not the forked repository, skipping the workflow."
exit 1
fi
- name: Set up Bun
uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun install
- name: Lint code
run: bun run lint
- name: Build
run: bun run build
- name: Rename dist folder to app
run: |
if [ -d "dist" ]; then
mv dist server
fi
- name: Remove Src
run: rm -rf src
- name: Deploy to Vercel
run: |
npm install -g vercel
vercel --prod --token ${{ secrets.VERCEL_TOKEN }}
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}