Skip to content

Merge pull request #544 from culturecreates/feature/issue-540 #243

Merge pull request #544 from culturecreates/feature/issue-540

Merge pull request #544 from culturecreates/feature/issue-540 #243

name: Staging build and deploy to S3
on:
push:
branches:
- develop
jobs:
deploy:
env:
AWS_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY }}
AWS_REGION: ca-central-1
WEBHOSTING_BUCKET_NAME: staging.cms.footlight.io
runs-on: ubuntu-latest
container:
image: sleavely/node-awscli:14.x
steps:
- uses: actions/checkout@v2
- run: npm install
- run: npm run build:staging
- run: aws s3 sync ./build s3://${{env.WEBHOSTING_BUCKET_NAME}}/ --acl public-read --delete --exclude index.html
- run: aws s3 cp ./build/index.html s3://${{env.WEBHOSTING_BUCKET_NAME}}/index.html --metadata-directive REPLACE --cache-control max-age=0,s-maxage=86400 --acl public-read --content-type text/html