Skip to content

Commit a92ec7d

Browse files
committed
Add GitHub Actions workflow at repository root
1 parent 73abfd3 commit a92ec7d

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/deploy-p2.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Project 2 - Deploy My Web App
2+
3+
# When to run this
4+
on:
5+
push:
6+
branches: [main]
7+
paths:
8+
- 'project-2/**'
9+
workflow_dispatch: # Allows manual triggering
10+
11+
jobs:
12+
deploy:
13+
runs-on: ubuntu-latest
14+
15+
defaults:
16+
run:
17+
working-directory: ./project-2
18+
19+
steps:
20+
# Get your code
21+
- uses: actions/checkout@v4
22+
23+
# Setup Node.js
24+
- uses: actions/setup-node@v4
25+
with:
26+
node-version: '18'
27+
28+
# Install and test
29+
- run: npm install
30+
- run: npm test
31+
32+
# Build Docker image
33+
- run: docker build -t my-webapp .
34+
35+
# (You'll add deployment steps here later)
36+
- run: echo "App tested and built successfully!"

0 commit comments

Comments
 (0)