Skip to content

Commit 6c3d9d1

Browse files
committed
Refine Workflows
1 parent 4fcb55b commit 6c3d9d1

File tree

3 files changed

+64
-40
lines changed

3 files changed

+64
-40
lines changed

.github/workflows/ci-cd.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/workflows/deploy.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Continuous Deployment
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
deploy:
10+
name: Build and Deploy to GH-Pages
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout the code base
16+
uses: actions/checkout@v3
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: '22'
22+
23+
- name: Install dependencies
24+
run: npm install --legacy-peer-deps
25+
26+
- name: Build the project
27+
run: npm run build
28+
29+
- name: Deploy with gh-pages
30+
run: |
31+
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
32+
npx gh-pages -d dist --cname safwansayeed.live -u "github-actions-bot <[email protected]>"
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/integration.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Continuous Integration
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
name: Test Build
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout the code base
19+
uses: actions/checkout@v3
20+
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: '22'
25+
26+
- name: Install dependencies
27+
run: npm install
28+
29+
- name: Build the project
30+
run: npm run build

0 commit comments

Comments
 (0)