-
Notifications
You must be signed in to change notification settings - Fork 3
82 lines (69 loc) · 2.2 KB
/
ci_demo-app.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Deploy demo-app
on:
push:
branches:
- main
tags-ignore:
- '**'
paths-ignore:
- 'projects/site/**'
workflow_dispatch:
concurrency:
group: deploy-demo-app-group-${{ github.ref }}
cancel-in-progress: true
env:
NODE: 18
HUSKY: 0
jobs:
ci_tests:
concurrency:
group: Run tests-${{ github.ref }}
cancel-in-progress: true
uses: ./.github/workflows/ci_tests.yml
ci_demo-app:
needs: ci_tests
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE }}
registry-url: https://registry.npmjs.org/
cache: npm
- name: Install latest npm
run: npm install -g npm@latest
- name: Cache .angular and node_modules
uses: actions/cache@v4
id: cache-step
with:
key: cache-ubuntu-latest-node${{ env.NODE }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
cache-ubuntu-latest-node${{ env.NODE }}-
path: |
.angular/cache
node_modules
- name: Install dependencies
if: steps.cache-step.outputs.cache-hit != 'true'
run: npm clean-install --engine-strict
# - name: Lint demo-app
# working-directory: projects/demo-app
# run: npm run lint
- name: Build demo-app:auth-js
working-directory: projects/demo-app/web
env:
baseUrl: /${{ github.event.repository.name }}/demo-app/auth-js/
run: npm run build:auth-js -- --base-href=${{ env.baseUrl }} --deploy-url=${{ env.baseUrl }}
- name: Build demo-app:ngx-auth
working-directory: projects/demo-app/web
env:
baseUrl: /${{ github.event.repository.name }}/demo-app/ngx-auth/
run: npm run build:ngx-auth -- --base-href=${{ env.baseUrl }} --deploy-url=${{ env.baseUrl }}
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist/demo-app
destination_dir: demo-app
commit_message: 'deploy(demo-app):'