-
Notifications
You must be signed in to change notification settings - Fork 97
43 lines (36 loc) · 1.16 KB
/
main.yml
File metadata and controls
43 lines (36 loc) · 1.16 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
name: Build and test
on:
push:
branches: [main, big-update]
jobs:
build-test-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
cache-dependency-path: src/package-lock.json
- name: Build and test
working-directory: src
run: |
npm ci
npm run build
npm run test
- name: Verify ng add works
run: |
cd src/dist && npm link && cd ../..
npm install -g @angular/cli
ng new test-app --defaults
cd test-app
npm link angular-cli-ghpages
ng add angular-cli-ghpages
# CI test only: Verifies that the gh-pages branch gets updated
# This is NOT a production deployment - there is no public website for angular-cli-ghpages
- name: Deploy
if: github.ref == 'refs/heads/main'
working-directory: test-app
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ng deploy --name="The Buildbot" --email="buildbot@angular2buch.de" --cname=angular-cli-ghpages.angular.schule