adding production setup
All checks were successful
Beta CI/CD Pipeline / build-and-test (push) Successful in 1m2s
Beta CI/CD Pipeline / deploy-beta (push) Successful in 25s

This commit is contained in:
vickytechkey 2026-09-09 19:25:02 +05:30
parent 36c9a1e41a
commit c18ccd21b9

View file

@ -1,4 +1,4 @@
name: Production CI/CD Pipeline
name: Beta CI/CD Pipeline
on:
push:
@ -31,12 +31,10 @@ jobs:
name: dist
path: dist/
deploy-prod:
deploy-beta:
needs: build-and-test
runs-on: ubuntu-latest
container: node:22
environment:
name: production
steps:
- name: Download Build Artifact
uses: actions/download-artifact@v3
@ -44,14 +42,12 @@ jobs:
name: dist
path: dist
- name: Install lftp
- name: Install AWS CLI
run: |
apt-get update && apt-get install -y lftp
apt-get update && apt-get install -y awscli
- name: Deploy to Production via FTP
env:
FTP_USERNAME: ${{ secrets.FTP_USERNAME }}
FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }}
FTP_HOST: ${{ secrets.FTP_HOST }}
run: |
lftp -d -u "$FTP_USERNAME","$FTP_PASSWORD" -e "set ssl:verify-certificate no; set ftp:ssl-allow yes; set ftp:ssl-force true; set ftp:ssl-protect-data true; set ftp:passive-mode true; mirror -R dist/ ./; quit" $FTP_HOST
- name: Deploy to S3
run: aws s3 sync dist/ s3://partnerproductionsite --delete
- name: Invalidate CloudFront
run: aws cloudfront create-invalidation --distribution-id EBBGP8E0MLQNJ --paths "/*"