Skip to content

Commit bccf91b

Browse files
author
Emmanuela Opurum
committed
Add CI/CD workflow for static bank site
1 parent f2f51ca commit bccf91b

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/ci-cd.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CI/CD Static Bank Site
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build-and-deploy:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v3
16+
17+
- name: Set up Node.js
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: '18'
21+
22+
- name: Install dependencies
23+
run: npm install
24+
25+
- name: Build site (optional for static site)
26+
run: npm run build || echo "No build step needed for static site"
27+
28+
- name: Test (optional)
29+
run: npm run test || echo "No tests defined"
30+
31+
- name: Deploy to GitHub Pages
32+
uses: peaceiris/actions-gh-pages@v4
33+
with:
34+
github_token: ${{ secrets.GITHUB_TOKEN }}
35+
publish_dir: ./ # your static site root folder

0 commit comments

Comments
 (0)