File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Деплой фронта при push в ветку front-prod (мерж PR → front-prod).
2+ # Сборка client/ и загрузка на хостинг по FTP (домашняя директория FTP-пользователя: /www/dayflow.today).
3+ name : Deploy Frontend (prod)
4+
5+ on :
6+ push :
7+ branches : [front-prod]
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v4
14+
15+ - uses : actions/setup-node@v4
16+ with :
17+ node-version : " 20"
18+ cache : " npm"
19+ cache-dependency-path : client/package-lock.json
20+
21+ - name : Install dependencies
22+ run : npm ci --prefix client
23+
24+ - name : Build
25+ run : npm run build --prefix client
26+ env :
27+ VITE_GRAPHQL_URL : ${{ secrets.VITE_GRAPHQL_URL || 'https://api.example.com/graphql' }}
28+
29+ - name : Upload artifact
30+ uses : actions/upload-artifact@4
31+ with :
32+ name : front-dist
33+ path : client/dist
34+
35+ deploy :
36+ needs : build
37+ runs-on : ubuntu-latest
38+ steps :
39+ - name : Download artifact
40+ uses : actions/download-artifact@4
41+ with :
42+ name : front-dist
43+
44+ - name : Deploy via FTP
45+ uses : SamKirkland/FTP-Deploy-Action@v4.3.5
46+ with :
47+ server : ${{ secrets.FTP_SERVER }}
48+ username : ${{ secrets.FTP_USERNAME }}
49+ password : ${{ secrets.FTP_PASSWORD }}
50+ local-dir : ./
51+ server-dir : ./
52+ dangerous-clean-slate : false
You can’t perform that action at this time.
0 commit comments