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+ name : Deploy Example to GitHub Pages
2+
3+ on :
4+ push :
5+ branches : [master]
6+ workflow_dispatch :
7+
8+ permissions :
9+ contents : write
10+
11+ jobs :
12+ deploy :
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - name : Checkout
17+ uses : actions/checkout@v4
18+
19+ - name : Setup Node.js
20+ uses : actions/setup-node@v4
21+ with :
22+ node-version : ' 20'
23+ cache : ' npm'
24+
25+ # Library devDeps must be installed so the example build can resolve
26+ # @angular/core from the root node_modules (path alias ../src/public-api.ts)
27+ - name : Install library dependencies
28+ run : npm ci
29+
30+ - name : Install example dependencies
31+ run : npm ci
32+ working-directory : example
33+
34+ - name : Build example
35+ run : npx ng build --base-href /angular-draggable/ --configuration production
36+ working-directory : example
37+
38+ - name : Add .nojekyll
39+ run : touch example/dist/example/browser/.nojekyll
40+
41+ - name : Deploy to gh-pages branch
42+ uses : peaceiris/actions-gh-pages@v4
43+ with :
44+ github_token : ${{ secrets.GITHUB_TOKEN }}
45+ publish_dir : example/dist/example/browser
46+ force_orphan : true
47+ commit_message : ' deploy: ${{ github.sha }}'
You can’t perform that action at this time.
0 commit comments