File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Build and Upload
22
33on :
4- workflow_dispatch :
54 push :
65 branches :
76 - sc-ddt-gha
2423permissions :
2524 contents : read
2625 id-token : write
27-
26+
2827jobs :
2928 build-and-upload :
3029 environment : ${{ github.ref_name == 'master' && 'staging' || github.ref_name == 'release' && 'produccion' || github.ref_name == 'sc-*' && 'ephemeral' }}
3332 && vars.AWS_RG_NAME_PRO || vars.AWS_RG_NAME_NONPRO }}
3433 env :
3534 ENVIRONMENT : ${{ github.ref_name == 'master' && 'staging' || github.ref_name == 'release' && 'prod' || github.ref_name == 'sc-*' && 'ephemeral' }}
36- OUT_DIR : ${{ github.ref == 'refs/heads/master' && 'build/staging' || github.ref == 'refs/heads/release' && 'build/prod' || startsWith(github.ref, 'refs/heads/sc-') && 'build/dev ' }}
37- S3_BUCKET : ${{ github.ref == 'refs/heads/master' && vars.S3_BUCKET_STAGING || github.ref == 'refs/heads/release' && vars.S3_BUCKET_PRODUCTION || startsWith(github.ref, 'refs/heads/sc-') && 'aplazame- ephemeral-environments' }}
35+ OUT_DIR : ${{ github.ref == 'refs/heads/master' && 'build/staging' || github.ref == 'refs/heads/release' && 'build/prod' || startsWith(github.ref, 'refs/heads/sc-') && 'build/staging ' }}
36+ S3_BUCKET : ${{ github.ref == 'refs/heads/master' && vars.S3_BUCKET_STAGING || github.ref == 'refs/heads/release' && vars.S3_BUCKET_PRODUCTION || startsWith(github.ref, 'refs/heads/sc-') && 'ephemeral-environments' }}
3837 steps :
3938 - name : Checkout code
4039 uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
7372 - name : Deploy to ephemerals - Branch SC
7473 if : startsWith(github.ref, 'refs/heads/sc-')
7574 run : |
76- aws s3 sync build/dev s3://aplazame- ephemeral-environments/sc- ${{ env.BRANCH_NAME }}- ${{ env.APP }}-dev --acl public-read --cache-control "private, max-age:3600" --delete
77- aws s3 cp build/dev s3://aplazame- ephemeral-environments/sc- ${{ env.BRANCH_NAME }}- ${{ env.APP }}-dev --recursive --exclude '*' --include '*.html' --acl public-read --cache-control 'no-cache, no-store'
75+ aws s3 sync build/staging s3://ephemeral-environments/${{ env.APP }}${{ env.BRANCH_NAME }} --acl public-read --cache-control "private, max-age:3600" --delete
76+ aws s3 cp build/staging s3://ephemeral-environments/${{ env.APP }}/ ${{ env.BRANCH_NAME }} --recursive --exclude '*' --include '*.html' --acl public-read --cache-control 'no-cache, no-store'
7877
You can’t perform that action at this time.
0 commit comments