Deploy NextJS to AWS S3 with NX
Unanswered
Broad-snouted Caiman posted this in #help-forum
Broad-snouted CaimanOP
Im deploying 2 MFEs nextjs app to AWS S3.
when Im done building the apps it goes to
my question is, should we upload all files and folder of the MFEs apps into the s3 bucket?
this is my cmd:
when Im done building the apps it goes to
dist folder (p/s: im using nx tool to im running nx run-many --target=build --all --skip-nx-cache)my question is, should we upload all files and folder of the MFEs apps into the s3 bucket?
this is my cmd:
aws s3 sync ./dist/apps/mfe1 s3://${{ env.AWS_S3_BUCKET }}/core --region ${{ secrets.AWS_REGION }} --delete
aws cloudfront create-invalidation --distribution-id ${{ env.AWS_CLOUDFRONT_DISTRIBUTION_ID }} --paths "/mfe1/*"