Skip to content

Merge pull request #51 from culturecreates/readme-update #101

Merge pull request #51 from culturecreates/readme-update

Merge pull request #51 from culturecreates/readme-update #101

name: Build and deploy develop branch to S3 Staging
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-widget.footlight.io
runs-on: ubuntu-22.04
container:
image: sleavely/node-awscli:14.x
steps:
- uses: actions/checkout@v2
- run: npm install
- run: npm run build:staging
- run: |
current_version=$(node -p "require('./package.json').version")
major_version=$(echo $current_version | cut -d. -f1)
aws s3 sync ./build s3://${{env.WEBHOSTING_BUCKET_NAME}}/v${major_version}/ --acl public-read --cache-control max-age=3600 --delete