-
Notifications
You must be signed in to change notification settings - Fork 1
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 #60 from Sun-Mountain/59-bug-fix-auto-update-genco…
…n-list 59 - auto gen bug
- Loading branch information
Showing
14 changed files
with
755 additions
and
59 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,13 +10,14 @@ jobs: | |
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: '0' | ||
- name: Minor version for each merge | ||
- name: Dry Run | ||
id: taggerDryRun | ||
uses: anothrNick/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
WITH_V: true | ||
DRY_RUN: true | ||
DEFAULT_BUMP: patch | ||
|
||
- name: echo new tag | ||
run: | | ||
|
@@ -27,7 +28,7 @@ jobs: | |
- name: echo part | ||
run: | | ||
echo "The version increment was: ${{ steps.taggerDryRun.outputs.part }}" | ||
- name: Minor version for each merge | ||
- name: Tag Real | ||
id: taggerFinal | ||
uses: anothrNick/[email protected] | ||
env: | ||
|
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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
name: Import GenCon Events | ||
|
||
on: | ||
schedule: | ||
- cron: 0 0 * * * | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
|
@@ -21,37 +23,24 @@ jobs: | |
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- name: Install convert-excel-to-json | ||
run: npm install -g convert-excel-to-json | ||
- name: Rename event.json | ||
run: mv -i ./frontend/assets/events/events.json ./frontend/assets/events/events-${{ env.STORED_DATE }}.json | ||
- name: Find oldest file | ||
run: echo "OLDEST_FILE=$( find ./frontend/assets/events -type f | sort | head -n 1)" >> $GITHUB_ENV | ||
- name: Find newest file | ||
run: echo "NEWEST_FILE=$( find ./frontend/assets/events -type f | sort | tail -n 1)" >> $GITHUB_ENV | ||
run: mv -i ./frontend/assets/events/events.json ./frontend/assets/events/events2.json | ||
- name: Remove raw data file | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
remove: './frontend/assets/events/rawEvents.json' | ||
- name: Download zip file | ||
run: curl https://www.gencon.com/downloads/events.zip -L -o events.zip | ||
- name: Unzip file | ||
run: 7z x events.zip | ||
- name: Install convert-excel-to-json | ||
run: npm install -g convert-excel-to-json | ||
- name: Convert to JSON | ||
run: convert-excel-to-json --sourceFile="events.xlsx" > ./frontend/assets/events/events.json | ||
run: convert-excel-to-json --sourceFile="events.xlsx" > ./frontend/assets/events/rawEvents.json | ||
- name: Add new file | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
add: './frontend/assets/events/events.json' | ||
- name: Count files | ||
run: echo "FILE_COUNT=$(find ./frontend/assets/events ls | wc -l)" >> $GITHUB_ENV | ||
- name: Remove oldest file | ||
if: ${{ env.FILE_COUNT }} > 2 | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
remove: '${{ env.OLDEST_FILE }}' | ||
- name: Update last updated date | ||
uses: jossef/[email protected] | ||
with: | ||
file: ./frontend/assets/events/lastUpdate.json | ||
field: date | ||
value: ${{ env.STORED_DATE }} | ||
- name: Remove xlsx file | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
|
@@ -60,3 +49,15 @@ jobs: | |
uses: EndBug/add-and-commit@v9 | ||
with: | ||
remove: 'events.zip' | ||
- name: Run ParseData.js | ||
run: node ./frontend/modules/parseData.js > ./frontend/assets/events/events.json | ||
- name: Add new file | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
add: './frontend/assets/events/events.json' | ||
- name: Update last updated date | ||
uses: jossef/[email protected] | ||
with: | ||
file: ./frontend/assets/events/lastUpdate.json | ||
field: date | ||
value: ${{ env.STORED_DATE }} |
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
.../assets/events/events-20230724011611.json → frontend/assets/events/events2.json
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"date": "20230724011611" | ||
"date": "20230725181224" | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
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.
0b82020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
gen-con-cal – ./
www.genconcal.com
gen-con-cal-sun-mountain.vercel.app
gen-con-cal-git-main-sun-mountain.vercel.app
gen-con-cal.vercel.app
genconcal.com