adding production setup
This commit is contained in:
parent
36c9a1e41a
commit
c18ccd21b9
1 changed files with 9 additions and 13 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
name: Production CI/CD Pipeline
|
name: Beta CI/CD Pipeline
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
|
@ -31,12 +31,10 @@ jobs:
|
||||||
name: dist
|
name: dist
|
||||||
path: dist/
|
path: dist/
|
||||||
|
|
||||||
deploy-prod:
|
deploy-beta:
|
||||||
needs: build-and-test
|
needs: build-and-test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: node:22
|
container: node:22
|
||||||
environment:
|
|
||||||
name: production
|
|
||||||
steps:
|
steps:
|
||||||
- name: Download Build Artifact
|
- name: Download Build Artifact
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
|
|
@ -44,14 +42,12 @@ jobs:
|
||||||
name: dist
|
name: dist
|
||||||
path: dist
|
path: dist
|
||||||
|
|
||||||
- name: Install lftp
|
- name: Install AWS CLI
|
||||||
run: |
|
run: |
|
||||||
apt-get update && apt-get install -y lftp
|
apt-get update && apt-get install -y awscli
|
||||||
|
|
||||||
- name: Deploy to Production via FTP
|
- name: Deploy to S3
|
||||||
env:
|
run: aws s3 sync dist/ s3://partnerproductionsite --delete
|
||||||
FTP_USERNAME: ${{ secrets.FTP_USERNAME }}
|
|
||||||
FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }}
|
- name: Invalidate CloudFront
|
||||||
FTP_HOST: ${{ secrets.FTP_HOST }}
|
run: aws cloudfront create-invalidation --distribution-id EBBGP8E0MLQNJ --paths "/*"
|
||||||
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
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue