-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.04 KB
/
frontend-deploy.yml
File metadata and controls
47 lines (39 loc) · 1.04 KB
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: Build Frontend Angular
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "frontend/**"
workflow_call:
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Clone Project
uses: actions/checkout@v4 # Используем мажорную версию v4 для стабильности
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: "22"
cache: "npm"
cache-dependency-path: "frontend/package-lock.json"
- name: Install Dependencies
run: |
cd frontend
npm ci --legacy-peer-deps
- name: Build Frontend Angular
run: |
cd frontend
npm run build --prod
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: frontend/dist
branch: gh-frontend
token: ${{ secrets.GITHUB_TOKEN }}
clean: true