This repository has been archived by the owner on Dec 17, 2024. It is now read-only.
Merge pull request #537 from willpublicmedia/footer-wordmark-aria-role #24
Workflow file for this run
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: deploy_minor | |
on: | |
push: | |
tags: [ '**' ] | |
pull_request: | |
tags: [ '**' ] | |
env: | |
MINORVERSION: '' | |
FULLVERSION: '' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Get Version | |
id: get_version | |
uses: battila7/get-version-action@v2 | |
- name: Check for correct naming convention | |
if: ${{ !steps.get_version.outputs.is-semver }} | |
run: exit 1 | |
- 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: Display version minor install | |
run: echo "Installing minor version ${MINORVERSION}" | |
- name: Display version patch (full) install | |
run: echo "Installing patch (full) version ${FULLVERSION}" | |
- run: npm install | |
- run: npm rebuild | |
- run: npm run-script build | |
- name: Configure AWS Credentials (DEPRECIATED) | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.CDN_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.CDN_SECRET_ACCESS_KEY }} | |
aws-region: us-east-2 | |
- name: Deploy toolbox to CDN BRAND S3 bucket for minor version if not prelease (DEPRECIATED) | |
if: ${{ steps.get_version.outputs.prerelease == '' }} | |
run: aws s3 sync ./dist/ s3://cdn.brand.illinois.edu/toolkit/$MINORVERSION --delete --acl bucket-owner-full-control | |
- name: Build examples for minor version if not prelease (DEPRECIATED) | |
if: ${{ steps.get_version.outputs.prerelease == '' }} | |
run: npm run-script create-test-html -- --pathprefix=toolkit/$MINORVERSION/examples/ | |
- name: Deploy examples to CDN BRAND S3 bucket for minor version if not prelease (DEPRECIATED) | |
if: ${{ steps.get_version.outputs.prerelease == '' }} | |
run: aws s3 sync ./var/full-site-deploy/ s3://cdn.brand.illinois.edu/toolkit/$MINORVERSION/examples --delete --acl bucket-owner-full-control | |
- name: Deploy static images in examples to CDN BRAND S3 bucket for minor version if not prelease (DEPRECIATED) | |
if: ${{ steps.get_version.outputs.prerelease == '' }} | |
run: aws s3 sync ./tests/_reference/ s3://cdn.brand.illinois.edu/toolkit/$MINORVERSION/examples/static-images --acl bucket-owner-full-control | |
- name: Invalidate Cloudfront cache for minor version if not prelease (DEPRECIATED) | |
if: ${{ steps.get_version.outputs.prerelease == '' }} | |
run: aws cloudfront create-invalidation --distribution-id E2VPGHCUOM84HO --paths "/toolkit/$MINORVERSION*" | |
- name: Deploy toolbox to CDN BRAND S3 bucket for full version (DEPRECIATED) | |
run: aws s3 sync ./dist/ s3://cdn.brand.illinois.edu/toolkit/$FULLVERSION --delete --acl bucket-owner-full-control | |
- name: Build examples for full version (DEPRECIATED) | |
run: npm run-script create-test-html -- --pathprefix=toolkit/$FULLVERSION/examples/ | |
- name: Deploy examples to CDN BRAND S3 bucket for full version (DEPRECIATED) | |
run: aws s3 sync ./var/full-site-deploy/ s3://cdn.brand.illinois.edu/toolkit/$FULLVERSION/examples --delete --acl bucket-owner-full-control | |
- name: Deploy static images in examples to S3 bucket for full version (DEPRECIATED) | |
run: aws s3 sync ./tests/_reference/ s3://cdn.brand.illinois.edu/toolkit/$FULLVERSION/examples/static-images --acl bucket-owner-full-control | |
- name: Invalidate Cloudfront cache for full version (DEPRECIATED) | |
run: aws cloudfront create-invalidation --distribution-id E2VPGHCUOM84HO --paths "/toolkit/$FULLVERSION*" | |
- 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 for minor version if not prelease | |
if: ${{ steps.get_version.outputs.prerelease == '' }} | |
run: aws s3 sync ./dist/ s3://cdn.toolkit.illinois.edu/content/$MINORVERSION --delete --acl bucket-owner-full-control | |
- name: Build examples for minor version if not prelease | |
if: ${{ steps.get_version.outputs.prerelease == '' }} | |
run: npm run-script create-test-html -- --pathprefix=$MINORVERSION/examples/ | |
- name: Deploy examples to S3 bucket for minor version if not prelease | |
if: ${{ steps.get_version.outputs.prerelease == '' }} | |
run: aws s3 sync ./var/full-site-deploy/ s3://cdn.toolkit.illinois.edu/content/$MINORVERSION/examples --delete --acl bucket-owner-full-control | |
- name: Deploy static images in examples to S3 bucket for minor version if not prelease | |
if: ${{ steps.get_version.outputs.prerelease == '' }} | |
run: aws s3 sync ./tests/_reference/ s3://cdn.toolkit.illinois.edu/content/$MINORVERSION/examples/static-images --acl bucket-owner-full-control | |
- name: Invalidate Cloudfront cache for minor version if not prelease | |
if: ${{ steps.get_version.outputs.prerelease == '' }} | |
run: aws cloudfront create-invalidation --distribution-id EXFMUB66J7AM8 --paths "/$MINORVERSION*" | |
- name: Deploy toolbox to S3 bucket for full version | |
run: aws s3 sync ./dist/ s3://cdn.toolkit.illinois.edu/content/$FULLVERSION --delete --acl bucket-owner-full-control | |
- name: Build examples for full version | |
run: npm run-script create-test-html -- --pathprefix=$FULLVERSION/examples/ | |
- name: Deploy examples to S3 bucket for full version | |
run: aws s3 sync ./var/full-site-deploy/ s3://cdn.toolkit.illinois.edu/content/$FULLVERSION/examples --delete --acl bucket-owner-full-control | |
- name: Deploy static images in examples to S3 bucket for full version | |
run: aws s3 sync ./tests/_reference/ s3://cdn.toolkit.illinois.edu/content/$FULLVERSION/examples/static-images --acl bucket-owner-full-control | |
- name: Invalidate Cloudfront cache for full version | |
run: aws cloudfront create-invalidation --distribution-id EXFMUB66J7AM8 --paths "/$FULLVERSION*" |