File tree 3 files changed +19
-7
lines changed
3 files changed +19
-7
lines changed Original file line number Diff line number Diff line change 13
13
uses : ./.github/actions/nodejs
14
14
15
15
- name : Build demo
16
- run : npm run build
16
+ run : npx nx build-gh-pages
17
17
18
18
- name : Deploy
19
19
uses : JamesIves/github-pages-deploy-action@v4.2.5
Original file line number Diff line number Diff line change 13
13
14
14
1 . Run ` npm ci ` to install everything
15
15
16
- 2 . Change ` npmScope ` inside ` nx.json `
16
+ 2 . Use search to replace all mentions of ` angular-open-source-starter ` with your new library name (` npmScope ` inside
17
+ ` nx.json ` , matadata of the root ` package.json ` , root ` README.md ` etc.)
17
18
18
19
3 . Create basic file structure via [ Nx-generators] ( https://nx.dev/plugin-features/use-code-generators ) :
19
20
Original file line number Diff line number Diff line change 8
8
"build" : {
9
9
"executor" : " @angular-devkit/build-angular:browser" ,
10
10
"options" : {
11
+ "baseHref" : " /" ,
12
+ "deployUrl" : " /" ,
11
13
"outputPath" : " dist/demo/browser" ,
12
14
"index" : " projects/demo/src/index.html" ,
13
15
"main" : " projects/demo/src/main.browser.ts" ,
26
28
},
27
29
"configurations" : {
28
30
"production" : {
29
- "baseHref" : " ./" ,
30
- "deployUrl" : " ./" ,
31
31
"fileReplacements" : [
32
32
{
33
33
"replace" : " projects/demo/src/environments/environment.ts" ,
50
50
}
51
51
]
52
52
},
53
- "development" : {
54
- "baseHref" : " /"
55
- }
53
+ "development" : {}
56
54
},
57
55
"defaultConfiguration" : " production"
58
56
},
57
+ "build-gh-pages" : {
58
+ "executor" : " @nrwl/workspace:run-commands" ,
59
+ "options" : {
60
+ "parallel" : false ,
61
+ "commands" : [
62
+ " echo 'Github pages require special baseHref + 404.html'" ,
63
+ " echo 'Read more: https://angular.io/guide/deployment#deploy-to-github-pages'" ,
64
+ " echo ------" ,
65
+ " nx build --base-href='/angular-open-source-starter/'" ,
66
+ " cp dist/demo/browser/index.html dist/demo/browser/404.html"
67
+ ]
68
+ }
69
+ },
59
70
"serve" : {
60
71
"executor" : " @angular-devkit/build-angular:dev-server" ,
61
72
"options" : {
You can’t perform that action at this time.
0 commit comments