-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (58 loc) · 1.7 KB
/
vercel_deploy_production.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
59
60
61
62
name: Vercel Deploy Production
on:
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4
with:
repository: LR-Tech-Blog/content
path: content
- uses: actions/checkout@v4
with:
repository: LR-Tech-Blog/blog
path: blog
- name: Remove dumy post images
run: rm -rf ./blog/public/images/posts
- name: Remove dumy content
run: rm -rf ./blog/src/content
- name: Copy content
run:
|
mkdir ./blog/src/content
mv ./content/content/* ./blog/src/content/
- name: Copy post images
run:
|
mkdir ./blog/public/images/posts
mv ./content/public/images/posts/* ./blog/public/images/posts/
- name: Install Vercel CLI
run: npm install -g vercel
- name: Install dependencies
run:
|
cd ./blog
npm install
- name: Astro build
run:
|
cd ./blog
npx astro sync
npx astro build
- name: Pull env information
run:
|
cd ./blog
vercel pull --yes --environment=${{ vars.VERCEL_ENVIRONMENT }} --token=${{ secrets.VERCEL_TOKEN }}
- name: Vercel build
run:
|
cd ./blog
vercel build --prod --yes --token=${{ secrets.VERCEL_TOKEN }}
- name: Vercel Deploy
run:
|
cd ./blog
vercel deploy --prebuilt --prod --yes --token=${{ secrets.VERCEL_TOKEN }}