This repository has been archived by the owner on Dec 17, 2024. It is now read-only.
Remove css, promote components to src root #83
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: deploy3_develop | |
on: | |
push: | |
branches-ignore: | |
- 'main' | |
- 'release/**' | |
- 'actions' | |
env: | |
VERSION: '' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Get version from release branch | |
run: echo "VERSION=${GITHUB_BRANCH}" >> $GITHUB_ENV | |
env: | |
GITHUB_BRANCH: ${{ github.ref_name }} | |
- name: If from develop branch, change to latest | |
if: ${{ github.ref == 'refs/heads/develop' }} | |
run: echo "VERSION=latest" >> $GITHUB_ENV | |
- name: Display version install | |
run: echo "Installing version ${VERSION} in dev.toolkit" | |
- run: npm install | |
- run: npm rebuild | |
- run: npm run-script build | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: 'AKIAXNR47MADGK2A4HEW' | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_FOR_AKIAXNR47MADGK2A4HEW }} | |
aws-region: us-east-2 | |
- name: Deploy toolbox to S3 bucket | |
run: aws s3 sync ./dist/ s3://dev.toolkit.illinois.edu/content/$VERSION --delete --acl bucket-owner-full-control | |
- name: Invalidate Cloudfront cache | |
run: aws cloudfront create-invalidation --distribution-id E2AF2WM1XJU9VI --paths "/$VERSION*" |