forked from marvel-uiuc/template-ilw
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from marvel-uiuc/main
Use CSS instead of js for the component styles
- Loading branch information
Showing
11 changed files
with
228 additions
and
224 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,82 +12,82 @@ jobs: | |
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Checkout GitHub Action' | ||
uses: actions/checkout@v4 | ||
- name: 'Get Version' | ||
id: get_version | ||
uses: dhkatz/[email protected] | ||
- name: 'Checkout GitHub Action' | ||
uses: actions/checkout@v4 | ||
- name: 'Get Version' | ||
id: get_version | ||
uses: dhkatz/[email protected] | ||
|
||
- name: 'Check for correct naming convention' | ||
if: ${{ !steps.get_version.outputs.is-semver }} | ||
run: exit 1 | ||
- name: 'Get major version from tag' | ||
run: echo "MAJORVERSION=${GITHUB_BRANCH}" >> $GITHUB_ENV | ||
env: | ||
GITHUB_BRANCH: ${{ steps.get_version.outputs.major }} | ||
- name: 'Get minor version from tag' | ||
run: echo "MINORVERSION=${GITHUB_BRANCH}.${GITHUB_BRANCH_MINOR}" >> $GITHUB_ENV | ||
env: | ||
GITHUB_BRANCH: ${{ steps.get_version.outputs.major }} | ||
GITHUB_BRANCH_MINOR: ${{ steps.get_version.outputs.minor }} | ||
- name: Get patch (full) version from tag | ||
run: echo "FULLVERSION=${GITHUB_BRANCH}" >> $GITHUB_ENV | ||
env: | ||
GITHUB_BRANCH: ${{ steps.get_version.outputs.version-without-v }} | ||
- name: Get prelease version from tag | ||
run: echo "PRERELEASE=${GITHUB_BRANCH}" >> $GITHUB_ENV | ||
env: | ||
GITHUB_BRANCH: ${{ steps.get_version.outputs.prerelease }} | ||
- name: Display major version install | ||
run: echo "Installing major version ${MAJORVERSION} for ${COMPONENT_NAME}" | ||
- name: Display minor version install | ||
run: echo "Installing minor version ${MINORVERSION} for ${COMPONENT_NAME}" | ||
- name: Display patch (full) version install | ||
run: echo "Installing patch (full) version ${FULLVERSION} for ${COMPONENT_NAME}" | ||
- name: Production run | ||
if: ${{ steps.get_version.outputs.prerelease == '' }} | ||
run: echo "Running production deployment" | ||
- name: Prerelease run | ||
if: ${{ steps.get_version.outputs.prerelease != '' }} | ||
run: echo "Running development deployment" | ||
- name: 'Check for correct naming convention' | ||
if: ${{ !steps.get_version.outputs.is-semver }} | ||
run: exit 1 | ||
- name: 'Get major version from tag' | ||
run: echo "MAJORVERSION=${GITHUB_BRANCH}" >> $GITHUB_ENV | ||
env: | ||
GITHUB_BRANCH: ${{ steps.get_version.outputs.major }} | ||
- name: 'Get minor version from tag' | ||
run: echo "MINORVERSION=${GITHUB_BRANCH}.${GITHUB_BRANCH_MINOR}" >> $GITHUB_ENV | ||
env: | ||
GITHUB_BRANCH: ${{ steps.get_version.outputs.major }} | ||
GITHUB_BRANCH_MINOR: ${{ steps.get_version.outputs.minor }} | ||
- name: Get patch (full) version from tag | ||
run: echo "FULLVERSION=${GITHUB_BRANCH}" >> $GITHUB_ENV | ||
env: | ||
GITHUB_BRANCH: ${{ steps.get_version.outputs.version-without-v }} | ||
- name: Get prelease version from tag | ||
run: echo "PRERELEASE=${GITHUB_BRANCH}" >> $GITHUB_ENV | ||
env: | ||
GITHUB_BRANCH: ${{ steps.get_version.outputs.prerelease }} | ||
- name: Display major version install | ||
run: echo "Installing major version ${MAJORVERSION} for ${COMPONENT_NAME}" | ||
- name: Display minor version install | ||
run: echo "Installing minor version ${MINORVERSION} for ${COMPONENT_NAME}" | ||
- name: Display patch (full) version install | ||
run: echo "Installing patch (full) version ${FULLVERSION} for ${COMPONENT_NAME}" | ||
- name: Production run | ||
if: ${{ steps.get_version.outputs.prerelease == '' }} | ||
run: echo "Running production deployment" | ||
- name: Prerelease run | ||
if: ${{ steps.get_version.outputs.prerelease != '' }} | ||
run: echo "Running development deployment" | ||
|
||
- 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: ${{ vars.TOOLKIT_AWS_ACCESS_KEY }} | ||
aws-secret-access-key: ${{ secrets.TOOLKIT_AWS_ACCESS_SECRET }} | ||
aws-region: us-east-2 | ||
- 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: ${{ vars.TOOLKIT_AWS_ACCESS_KEY }} | ||
aws-secret-access-key: ${{ secrets.TOOLKIT_AWS_ACCESS_SECRET }} | ||
aws-region: us-east-2 | ||
|
||
- name: Deploy toolbox to S3 bucket for major version | ||
if: ${{ steps.get_version.outputs.prerelease == '' }} | ||
run: aws s3 sync ./dist/ s3://cdn.toolkit.illinois.edu/content/$COMPONENT_NAME/$MAJORVERSION --delete --acl bucket-owner-full-control | ||
- name: Invalidate Cloudfront cache for major version | ||
if: ${{ steps.get_version.outputs.prerelease == '' }} | ||
run: aws cloudfront create-invalidation --distribution-id ${{ vars.TOOLKIT_AWS_CLOUDFRONT }} --paths "/$COMPONENT_NAME/$MAJORVERSION*" | ||
- name: Deploy toolbox to S3 bucket for minor version | ||
if: ${{ steps.get_version.outputs.prerelease == '' }} | ||
run: aws s3 sync ./dist/ s3://cdn.toolkit.illinois.edu/content/$COMPONENT_NAME/$MINORVERSION --delete --acl bucket-owner-full-control | ||
- name: Invalidate Cloudfront cache for minor version | ||
if: ${{ steps.get_version.outputs.prerelease == '' }} | ||
run: aws cloudfront create-invalidation --distribution-id ${{ vars.TOOLKIT_AWS_CLOUDFRONT }} --paths "/$COMPONENT_NAME/$MINORVERSION*" | ||
- name: Deploy toolbox to S3 bucket for patch (full) version | ||
if: ${{ steps.get_version.outputs.prerelease == '' }} | ||
run: aws s3 sync ./dist/ s3://cdn.toolkit.illinois.edu/content/$COMPONENT_NAME/$FULLVERSION --delete --acl bucket-owner-full-control | ||
- name: Invalidate Cloudfront cache for patch (full) version | ||
if: ${{ steps.get_version.outputs.prerelease == '' }} | ||
run: aws cloudfront create-invalidation --distribution-id ${{ vars.TOOLKIT_AWS_CLOUDFRONT }} --paths "/$COMPONENT_NAME/$FULLVERSION*" | ||
- name: Deploy toolbox to S3 bucket for full version dev | ||
if: ${{ steps.get_version.outputs.prerelease != '' }} | ||
run: aws s3 sync ./dist/ s3://dev.toolkit.illinois.edu/content/$COMPONENT_NAME/$FULLVERSION --delete --acl bucket-owner-full-control | ||
- name: Invalidate Cloudfront cache for full version dev | ||
if: ${{ steps.get_version.outputs.prerelease != '' }} | ||
run: aws cloudfront create-invalidation --distribution-id ${{ vars.TOOLKIT_AWS_CLOUDFRONT_DEV }} --paths "/$COMPONENT_NAME/$FULLVERSION*" | ||
- name: Deploy toolbox to S3 bucket for latest dev | ||
if: ${{ steps.get_version.outputs.prerelease != '' }} | ||
run: aws s3 sync ./dist/ s3://dev.toolkit.illinois.edu/content/$COMPONENT_NAME/latest --delete --acl bucket-owner-full-control | ||
- name: Invalidate Cloudfront cache for latest dev | ||
if: ${{ steps.get_version.outputs.prerelease != '' }} | ||
run: aws cloudfront create-invalidation --distribution-id ${{ vars.TOOLKIT_AWS_CLOUDFRONT_DEV }} --paths "/$COMPONENT_NAME/latest*" | ||
- name: Deploy toolbox to S3 bucket for major version | ||
if: ${{ steps.get_version.outputs.prerelease == '' }} | ||
run: aws s3 sync ./dist/ s3://cdn.toolkit.illinois.edu/content/$COMPONENT_NAME/$MAJORVERSION --delete --acl bucket-owner-full-control | ||
- name: Invalidate Cloudfront cache for major version | ||
if: ${{ steps.get_version.outputs.prerelease == '' }} | ||
run: aws cloudfront create-invalidation --distribution-id ${{ vars.TOOLKIT_AWS_CLOUDFRONT }} --paths "/$COMPONENT_NAME/$MAJORVERSION*" | ||
- name: Deploy toolbox to S3 bucket for minor version | ||
if: ${{ steps.get_version.outputs.prerelease == '' }} | ||
run: aws s3 sync ./dist/ s3://cdn.toolkit.illinois.edu/content/$COMPONENT_NAME/$MINORVERSION --delete --acl bucket-owner-full-control | ||
- name: Invalidate Cloudfront cache for minor version | ||
if: ${{ steps.get_version.outputs.prerelease == '' }} | ||
run: aws cloudfront create-invalidation --distribution-id ${{ vars.TOOLKIT_AWS_CLOUDFRONT }} --paths "/$COMPONENT_NAME/$MINORVERSION*" | ||
- name: Deploy toolbox to S3 bucket for patch (full) version | ||
if: ${{ steps.get_version.outputs.prerelease == '' }} | ||
run: aws s3 sync ./dist/ s3://cdn.toolkit.illinois.edu/content/$COMPONENT_NAME/$FULLVERSION --delete --acl bucket-owner-full-control | ||
- name: Invalidate Cloudfront cache for patch (full) version | ||
if: ${{ steps.get_version.outputs.prerelease == '' }} | ||
run: aws cloudfront create-invalidation --distribution-id ${{ vars.TOOLKIT_AWS_CLOUDFRONT }} --paths "/$COMPONENT_NAME/$FULLVERSION*" | ||
- name: Deploy toolbox to S3 bucket for full version dev | ||
if: ${{ steps.get_version.outputs.prerelease != '' }} | ||
run: aws s3 sync ./dist/ s3://dev.toolkit.illinois.edu/content/$COMPONENT_NAME/$FULLVERSION --delete --acl bucket-owner-full-control | ||
- name: Invalidate Cloudfront cache for full version dev | ||
if: ${{ steps.get_version.outputs.prerelease != '' }} | ||
run: aws cloudfront create-invalidation --distribution-id ${{ vars.TOOLKIT_AWS_CLOUDFRONT_DEV }} --paths "/$COMPONENT_NAME/$FULLVERSION*" | ||
- name: Deploy toolbox to S3 bucket for latest dev | ||
if: ${{ steps.get_version.outputs.prerelease != '' }} | ||
run: aws s3 sync ./dist/ s3://dev.toolkit.illinois.edu/content/$COMPONENT_NAME/latest --delete --acl bucket-owner-full-control | ||
- name: Invalidate Cloudfront cache for latest dev | ||
if: ${{ steps.get_version.outputs.prerelease != '' }} | ||
run: aws cloudfront create-invalidation --distribution-id ${{ vars.TOOLKIT_AWS_CLOUDFRONT_DEV }} --paths "/$COMPONENT_NAME/latest*" |
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
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
Oops, something went wrong.