File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change 1515 options :
1616 - dev
1717 - prod
18+ APPLICATION :
19+ description : " Application to deploy"
20+ required : true
21+ default : pyconkr
22+ type : choice
23+ options :
24+ - pyconkr-frontend
25+ - pyconkr-admin
1826 push :
1927 branches :
2028 - " main"
3038 env :
3139 API_STAGE : ${{ github.event_name == 'workflow_dispatch' && inputs.WORKFLOW_PHASE || 'dev' }}
3240 BUMP_RULE : ${{ (github.event_name == 'workflow_dispatch' && inputs.WORKFLOW_PHASE || 'dev') == 'dev' && '--mode development' || '' }}
33- AWS_S3_BUCKET : ${{ (github.event_name == 'workflow_dispatch' && inputs.WORKFLOW_PHASE || 'dev') == 'dev' && secrets.AWS_S3_BUCKET_DEV || secrets.AWS_S3_BUCKET_PROD }}
41+ AWS_S3_PYCONKR_FRONTEND_BUCKET : ${{ (github.event_name == 'workflow_dispatch' && inputs.WORKFLOW_PHASE || 'dev') == 'dev' && secrets.AWS_S3_PYCONKR_FRONTEND_BUCKET_DEV || secrets.AWS_S3_PYCONKR_FRONTEND_BUCKET_PROD }}
42+ AWS_S3_PYCONKR_ADMIN_BUCKET : ${{ (github.event_name == 'workflow_dispatch' && inputs.WORKFLOW_PHASE || 'dev') == 'dev' && secrets.AWS_S3_PYCONKR_ADMIN_BUCKET_DEV || secrets.AWS_S3_PYCONKR_ADMIN_BUCKET_PROD }}
3443 AWS_CLOUDFRONT_DISTRIBUTION_ID : ${{ (github.event_name == 'workflow_dispatch' && inputs.WORKFLOW_PHASE || 'dev') == 'dev' && secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID_DEV || secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID_PROD }}
44+ DEPLOY_TARGET_APPLICATION : ${{ (github.event_name == 'workflow_dispatch' && inputs.APPLICATION || 'pyconkr-frontend') == 'pyconkr-frontend' && 'pyconkr' || 'pyconkr-admin' }}
3545
3646 steps :
3747 - uses : actions/checkout@master
5565
5666 - run : mkdir -p dist
5767
58- - run : pnpm build:@apps/pyconkr ${{ env.BUMP_RULE }} && cp -r apps/pyconkr/dist/* dist/
59-
60- - run : pnpm build:@frontend && cp packages/common/dist/common.esm.js{,.map} dist/ && cp packages/shop/dist/shop.esm.js{,.map} dist/
68+ - run : pnpm build:@apps/${{ env.DEPLOY_TARGET_APPLICATION }} ${{ env.BUMP_RULE }} && cp -r apps/pyconkr/dist/* dist/
6169
62- - run : aws s3 cp --recursive ./dist s3://${{ env.AWS_S3_BUCKET }}/
70+ - run : aws s3 cp --recursive ./dist s3://${{ (github.event_name == 'workflow_dispatch' && inputs.APPLICATION || 'pyconkr-frontend') == 'pyconkr-frontend' && env.AWS_S3_PYCONKR_FRONTEND_BUCKET || env.AWS_S3_PYCONKR_ADMIN_BUCKET }}/
6371
6472 - run : aws cloudfront create-invalidation --distribution-id ${{ env.AWS_CLOUDFRONT_DISTRIBUTION_ID }} --paths "/*"
You can’t perform that action at this time.
0 commit comments