Skip to content

Commit 2dabbca

Browse files
1.0.0.1
This workflow sets up a CI/CD pipeline with linting, building, and deployment steps.
1 parent 51073ca commit 2dabbca

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI/CD Pipeline
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: actions/setup-node@v3
15+
with:
16+
node-version: '18'
17+
- run: npm install
18+
- run: npm run lint
19+
20+
build:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v3
24+
- uses: actions/setup-node@v3
25+
- run: npm install
26+
- run: npm run build
27+
28+
deploy:
29+
needs: [lint, build]
30+
runs-on: ubuntu-latest
31+
if: github.ref == 'refs/heads/main'
32+
steps:
33+
- run: npm run deploy

0 commit comments

Comments
 (0)