Skip to content

Commit 2d4de34

Browse files
ct-kaushalct-dixit
andauthored
Enhance CI workflow with versioning and S3 upload (#19)
* Enhance CI workflow with versioning and S3 upload * name add * add version * prod yml update --------- Co-authored-by: Dikshit Moradiya <106728438+ct-dixit@users.noreply.github.com>
1 parent 3c5639a commit 2d4de34

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

.github/workflows/prod.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020

2121
steps:
2222
- name: 🚚 Get latest code
23-
uses: actions/checkout@v3
23+
uses: actions/checkout@v4
2424

2525
- name: 📂 Deploy to Server
2626
uses: easingthemes/ssh-deploy@v4
@@ -32,4 +32,28 @@ jobs:
3232
REMOTE_USER: u106957989
3333
REMOTE_PORT: '65002'
3434
TARGET: domains/codedthemes.com/public_html/demos/admin-templates/datta-able/bootstrap/free
35-
EXCLUDE: '/node_modules/'
35+
EXCLUDE: '/node_modules/
36+
37+
- name: Read version
38+
id: version
39+
run: echo "VERSION=$(jq -r .version package.json)" >> $GITHUB_ENV
40+
41+
- name: 📦 Create version ZIP
42+
run: |
43+
zip -r "datta-able-bootstrap-v${VERSION}.zip" . \
44+
-x ".git/*" \
45+
-x ".github/workflows/*" \
46+
-x ".gitignore" \
47+
-x "node_modules/*"
48+
49+
- name: 🔑 Configure AWS Credentials
50+
uses: aws-actions/configure-aws-credentials@v4
51+
with:
52+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
53+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
54+
aws-region: us-west-2
55+
56+
- name: 🚀 Upload ZIP to S3
57+
run: |
58+
aws s3 cp "datta-able-bootstrap-v${VERSION}.zip" \
59+
"s3://${{ secrets.AWS_S3_BUCKET }}/DattaAble/Bootstrap/datta-able-bootstrap-v${VERSION}.zip"

0 commit comments

Comments
 (0)