Skip to content

Commit 20abfd9

Browse files
authored
fix: setup cd (#7)
Disabled cloud deployment workflow
1 parent 9fd5592 commit 20abfd9

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/cd.yml.disabled

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CD Pipeline
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: '20.x'
19+
cache: 'npm'
20+
21+
# To be updated depending on structure of project
22+
- name: Generate deployment package
23+
run: zip -r peerprep-app.zip index.js package.json package-lock.json
24+
25+
- name: Get Node.js version
26+
run: echo "VERSION=$(node -p 'require('./package.json').version')" >> "$GITHUB_ENV"
27+
28+
- name: Deploy to EB
29+
uses: einaregilsson/beanstalk-deploy@v22
30+
with:
31+
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
32+
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
33+
application_name: PeerPrep-09
34+
environment_name: PeerPrep-09-env
35+
region: ap-southeast-1
36+
version_label: Version-${{ github.sha }}
37+
deployment_package: peerprep-app.zip
38+
use_existing_version_if_available: true
39+

0 commit comments

Comments
 (0)