Skip to content

Commit

Permalink
Revert deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanjonker-illinois committed Jul 16, 2024
1 parent 5a0b8dd commit 7d48abf
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 57 deletions.
58 changes: 26 additions & 32 deletions .github/workflows/deploy_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,68 +8,62 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout toolkit management

- name: Checkout ilw-hero
uses: actions/checkout@v4
with:
repository: 'web-illinois/toolkit-management'
repository: 'web-illinois/ilw-hero'
ref: 'main'
path: './external-directory'
- name: Copy component files
run: cp ./external-directory/global-css/builder/*.json ./site/imported_json/components
- name: Copy component version files
run: cp ./external-directory/global-css/builder/versions/*.json ./site/imported_json/component_versions
- name: Remove directory
run: rm -r ./external-directory


- name: Checkout ilw-hero
uses: ./.github/workflows/pull_external.yml@main
with:
repository-name: web-illinois/ilw-hero
- run: cp ./external-directory/builder/*.json ./site/imported_json/components
- run: cp ./external-directory/builder/versions/*.json ./site/imported_json/component_versions
- run: rm -r ./external-directory

- name: Checkout ilw-back-to-top
uses: actions/checkout@v4
with:
repository: 'web-illinois/ilw-back-to-top'
ref: 'main'
path: './external-directory'
- name: Copy component files
run: cp ./external-directory/builder/*.json ./site/imported_json/components
- name: Copy component version files
run: cp ./external-directory/builder/versions/*.json ./site/imported_json/component_versions
- name: Remove directory
run: rm -r ./external-directory
- run: cp ./external-directory/builder/*.json ./site/imported_json/components
- run: cp ./external-directory/builder/versions/*.json ./site/imported_json/component_versions
- run: rm -r ./external-directory

- name: Checkout ilw-content
uses: actions/checkout@v4
with:
repository: 'web-illinois/ilw-content'
ref: 'main'
path: './external-directory'
- name: Copy component files
run: cp ./external-directory/builder/*.json ./site/imported_json/components
- name: Copy component version files
run: cp ./external-directory/builder/versions/*.json ./site/imported_json/component_versions
- name: Remove directory
run: rm -r ./external-directory
- run: cp ./external-directory/builder/*.json ./site/imported_json/components
- run: cp ./external-directory/builder/versions/*.json ./site/imported_json/component_versions
- run: rm -r ./external-directory

- name: Checkout ilw-page
uses: actions/checkout@v4
with:
repository: 'web-illinois/ilw-page'
ref: 'main'
path: './external-directory'
- name: Copy component files
run: cp ./external-directory/builder/*.json ./site/imported_json/components
- name: Copy component version files
run: cp ./external-directory/builder/versions/*.json ./site/imported_json/component_versions
- name: Remove directory
run: rm -r ./external-directory
- run: cp ./external-directory/builder/*.json ./site/imported_json/components
- run: cp ./external-directory/builder/versions/*.json ./site/imported_json/component_versions
- run: rm -r ./external-directory

- name: Checkout toolkit management
uses: actions/checkout@v4
with:
repository: 'web-illinois/toolkit-management'
ref: 'main'
path: './external-directory'
- run: cp ./external-directory/global-css/builder/*.json ./site/imported_json/components
- run: cp ./external-directory/global-css/builder/versions/*.json ./site/imported_json/component_versions
- run: rm -r ./external-directory

- name: NPM Install
run: npm install
- run: npm rebuild
- run: npm run-script build

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/pull_external.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ This deploys to:

## Adding to this project

The bad news is GitHub actions don't support looping except with the matrix option which isn't quite what we want, I'm using an external job and calling it. To add a new component to the toolkit builder, update the */.github/workflows/deploy_release.yml* file and add another pull_external line with the full name of the repository. This will check out the repository and copy the json files from the */builder/* and */builder/versions/* folders.
The bad news is GitHub actions don't support looping except with the matrix option and external jobs have a limit of 20. I am using judicious copy-paste. To add a new component to the toolkit builder, update the */.github/workflows/deploy_release.yml* file and add another Checkout section name of the repository. You will need to update the name of the repository in two places -- once in the title, once in the with repository name. This will check out the repository and copy the json files from the */builder/* and */builder/versions/* folders.

0 comments on commit 7d48abf

Please sign in to comment.