Skip to content

Commit c8b275f

Browse files
committed
ci: add github action for gh-pages
1 parent e1dbf05 commit c8b275f

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/gh-pages.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Deploy Angular SPA to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
with:
15+
persist-credentials: false
16+
- name: Use Node.js 16.x
17+
uses: actions/setup-node@v1
18+
with:
19+
node-version: '16.x'
20+
- name: Build
21+
run: |
22+
npm install -g @angular/cli
23+
npm install
24+
ng build --prod --base-href=""
25+
- name: Deploy
26+
uses: JamesIves/github-pages-deploy-action@releases/v2
27+
env:
28+
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
29+
BASE_BRANCH: master
30+
BRANCH: gh-pages
31+
FOLDER: dist/git-catalogue

0 commit comments

Comments
 (0)