Skip to content

Commit

Permalink
Merge pull request #4 from web-illinois/jonker/beta
Browse files Browse the repository at this point in the history
Prepping for beta
  • Loading branch information
bryanjonker-illinois authored Sep 13, 2024
2 parents dcf8650 + f935092 commit a8ae625
Show file tree
Hide file tree
Showing 19 changed files with 404 additions and 377 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/delete_development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: delete_development
on:
workflow_dispatch:
env:
COMPONENT_NAME: 'ilw-content' # set this to the web component name you are using
COMPONENT_NAME: ${{ github.event.repository.name }}
jobs:
build:
runs-on: ubuntu-latest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
name: deploy_production
name: deploy
on:
push:
tags: [ '**' ]
release:
types: [published]
env:
MAJORVERSION: ''
MINORVERSION: ''
FULLVERSION: ''
COMPONENT_NAME: 'ilw-content' # set this to the web component name you are using
PRERELEASE: ''
COMPONENT_NAME: ${{ github.event.repository.name }}
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -15,7 +16,7 @@ jobs:
uses: actions/checkout@v4
- name: 'Get Version'
id: get_version
uses: battila7/get-version-action@v2
uses: dhkatz/get-version-action@v3.0.0

- name: 'Check for correct naming convention'
if: ${{ !steps.get_version.outputs.is-semver }}
Expand All @@ -33,12 +34,22 @@ jobs:
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}"
run: echo "Installing major version ${MAJORVERSION} for ${COMPONENT_NAME}"
- name: Display minor version install
run: echo "Installing minor version ${MINORVERSION}"
run: echo "Installing minor version ${MINORVERSION} for ${COMPONENT_NAME}"
- name: Display patch (full) version install
run: echo "Installing patch (full) version ${FULLVERSION}"
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
Expand All @@ -51,14 +62,32 @@ jobs:
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
run: aws cloudfront create-invalidation --distribution-id ${{ vars.TOOLKIT_AWS_CLOUDFRONT }} --paths "/$COMPONENT_NAME/$FULLVERSION*"
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*"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: deploy_development
name: deploy_development_manual
on:
workflow_dispatch:
inputs:
Expand All @@ -8,8 +8,7 @@ on:
default: ''
type: string
env:
MAJORVERSION: ''
COMPONENT_NAME: 'ilw-content' # set this to the web component name you are using
COMPONENT_NAME: ${{ github.event.repository.name }}
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -21,7 +20,7 @@ jobs:
env:
GITHUB_BRANCH: ${{ github.event.inputs.version }}
- name: Display version install
run: echo "Installing dev version ${VERSION}"
run: echo "Installing dev version ${VERSION} for component ${COMPONENT_NAME}"

- run: npm install
- run: npm rebuild
Expand All @@ -35,4 +34,4 @@ jobs:
- name: Deploy toolbox to S3 bucket
run: aws s3 sync ./dist/ s3://dev.toolkit.illinois.edu/content/$COMPONENT_NAME/$VERSION --delete --acl bucket-owner-full-control
- name: Invalidate Cloudfront cache
run: aws cloudfront create-invalidation --distribution-id ${{ vars.TOOLKIT_AWS_CLOUDFRONT_DEV }} --paths "/$COMPONENT_NAME/$VERSION*"
run: aws cloudfront create-invalidation --distribution-id ${{ vars.TOOLKIT_AWS_CLOUDFRONT_DEV }} --paths "/$COMPONENT_NAME/$VERSION*"
7 changes: 2 additions & 5 deletions .github/workflows/deploy_production_manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ on:
default: ''
type: string
env:
MAJORVERSION: ''
MINORVERSION: ''
FULLVERSION: ''
COMPONENT_NAME: 'ilw-content' # set this to the web component name you are using
COMPONENT_NAME: ${{ github.event.repository.name }}
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -23,7 +20,7 @@ jobs:
env:
GITHUB_BRANCH: ${{ github.event.inputs.version }}
- name: Display version install
run: echo "Installing dev version ${VERSION}"
run: echo "Installing production version ${VERSION} for component ${COMPONENT_NAME}"

- run: npm install
- run: npm rebuild
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/publish_npm.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
name: publish_npm
on:
workflow_dispatch:
push:
tags: [ '**' ]
pull_request:
tags: [ '**' ]
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -20,4 +18,4 @@ jobs:
- name: Install to npm
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.TOOLKIT_NPM_SECRET}}
NODE_AUTH_TOKEN: ${{secrets.TOOLKIT_NPM_SECRET}}
2 changes: 1 addition & 1 deletion builder/ilw-content-inset.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"description": "The Content component with the inset mode enabled",
"toolkit-version": "",
"production-version": "",
"development-version": "1.0.0-alpha3"
"development-version": "1.0-beta"
}
2 changes: 1 addition & 1 deletion builder/ilw-content-introduction.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"description": "The Content component with the introduction mode enabled",
"toolkit-version": "",
"production-version": "",
"development-version": "1.0.0-alpha3"
"development-version": "1.0-beta"
}
2 changes: 1 addition & 1 deletion builder/ilw-content-lede.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"description": "The Content component with the lede mode enabled",
"toolkit-version": "",
"production-version": "",
"development-version": "1.0.0-alpha3"
"development-version": "1.0-beta"
}
2 changes: 1 addition & 1 deletion builder/ilw-content.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"description": "The Content component, used to display formatted content.",
"toolkit-version": "",
"production-version": "",
"development-version": "1.0.0-alpha3"
"development-version": "1.0-beta"
}
89 changes: 89 additions & 0 deletions builder/versions/ilw-content-inset.1.0-beta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"title": "Content - Inset",
"tag": "ilw-content-inset",
"github": "https://github.com/web-illinois/ilw-content/",
"type": "web component",
"element-name": "ilw-content",
"description": "The Content component with the inset mode enabled",
"builder-version": "1.0-beta",
"version": "1.0.0-beta",
"date": "9/13/2024",
"css": "https://dev.toolkit.illinois.edu/ilw-content/1.0.0-beta/ilw-content.css",
"js": "https://dev.toolkit.illinois.edu/ilw-hero/1.0.0-beta/ilw-content.js",
"production": false,
"notes": "",
"parent-style": "margin: 0 auto; max-width: 1200px;",
"samples": [
{
"name": "default",
"description": "Default content",
"text": "<h2>Join Us at Whispering Pines College</h2><p>Discover a place where academic excellence meets natural beauty. At Whispering Pines College, your journey toward a brighter future begins in the heart of the forest. Embrace the spirit of exploration, innovation, and community that defines us. Come, write your story among the pines.</p>"
}
],
"attributes-fixed": [
{
"name": "mode",
"description": "Mode of the component",
"depreciated": false,
"value": "inset"
}
],
"attributes-text": [
{
"name": "padding",
"description": "Padding of the text inside the component",
"depreciated": false,
"value": ""
}
],
"attributes": [
{
"name": "theme",
"description": "Color theme used",
"depreciated": false,
"values": [
"",
"blue",
"orange",
"blue-gradient",
"orange-gradient",
"gray"
]
},
{
"name": "width",
"description": "Width of component",
"depreciated": false,
"values": [
"",
"full",
"auto",
"page"
]
},
{
"name": "align",
"description": "Alignment of the text inside the component, defaults to left",
"depreciated": false,
"values": [
"",
"center",
"right"
]
}
],
"classes-fixed": [],
"classes": [],
"css-variables": [
{
"name": "--ilw-content--narrow-max-width",
"depreciated": false,
"description": "Size of the max width of the element in CSS length"
},
{
"name": "--ilw-content--narrow-padding",
"depreciated": false,
"description": "Size of the padding of the element in CSS length"
}
]
}
88 changes: 0 additions & 88 deletions builder/versions/ilw-content-inset.1.0.0-alpha3.json

This file was deleted.

Loading

0 comments on commit a8ae625

Please sign in to comment.