-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (55 loc) · 1.48 KB
/
deploy-base-front.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
61
62
name: Deploy Base Front
on:
push:
branches:
- deploy/production
paths:
- "base/apps/front-end/**"
- "base/apps/common/**"
workflow_dispatch:
permissions:
contents: read
jobs:
deploy:
name: Deploy Base Front to Netlify
runs-on: ubuntu-latest
environment: production
defaults:
run:
working-directory: ./base/apps/front-end
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
token: ${{ secrets.PAT_TOKEN_FOR_SUBMODULE }}
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9.1.4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: "20.14.x"
cache: "pnpm"
cache-dependency-path: |
base/apps/front-end/pnpm-lock.yaml
base/apps/common/pnpm-lock.yaml
- name: Install dependencies
run: |
cd ../common/
pnpm install
cd ../front-end/
pnpm install
- name: Build
env:
VITE_BACK_END_API_ENDPOINT: "https://api.admin-solution-plus.ai.lonestone.io"
run: pnpm run build
- name: Deploy
run: |
pnpm --package=netlify-cli dlx netlify deploy \
--dir ./dist \
-a ${{ secrets.NETLIFY_PAT }} \
-s ${{ vars.NETLIFY_SITE_ID }} \
--prod \
--message "Deploy from GitHub Actions [sha: ${{ github.sha }}]"