Skip to content

Commit 70b8663

Browse files
committed
added deploy
1 parent 1665e15 commit 70b8663

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Deploy Angular app to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Run workflow only when pushing to main branch
7+
8+
jobs:
9+
build-and-deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
# Checkout repo
14+
- name: Checkout code
15+
uses: actions/checkout@v3
16+
17+
# Setup Node.js
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: '18' # or the version you use
22+
23+
# Install dependencies & build Angular
24+
- name: Install dependencies
25+
run: npm install
26+
27+
- name: Build Angular app
28+
run: npm run build -- --configuration production --base-href "https://thughari.github.io/Collaborative-Editor-UI/"
29+
30+
# Deploy dist folder to gh-pages branch
31+
- name: Deploy to GitHub Pages
32+
uses: JamesIves/github-pages-deploy-action@v4
33+
with:
34+
branch: gh-pages # target branch
35+
folder: dist/collaborative-editor-ui/browser # 👈 adjust if Angular project name is different

0 commit comments

Comments
 (0)