Skip to content

Commit dce32b8

Browse files
authored
Merge pull request #12463 from wslyvh/dev
Import from ethereum events sheet
2 parents 9b66046 + 2e5f11b commit dce32b8

File tree

8 files changed

+736
-392
lines changed

8 files changed

+736
-392
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Import community events
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * SUN" # Runs every Sunday at midnight
6+
workflow_dispatch:
7+
8+
jobs:
9+
create_pr:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@master
13+
- uses: actions/setup-node@v3
14+
with:
15+
node-version: 18
16+
- run: yarn install
17+
- run: yarn events-import
18+
env:
19+
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
20+
- uses: EndBug/add-and-commit@v9
21+
with:
22+
default_author: github_actions
23+
message: "Update community events"

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"chromatic": "chromatic --project-token fee8e66c9916",
1818
"crowdin-clean": "rm -rf .crowdin && mkdir .crowdin",
1919
"crowdin-import": "ts-node src/scripts/crowdin-import.ts",
20+
"events-import": "ts-node -O '{ \"module\": \"commonjs\" }' src/scripts/events-import.ts",
2021
"markdown-checker": "ts-node -O '{ \"module\": \"commonjs\" }' src/scripts/markdownChecker.ts"
2122
},
2223
"dependencies": {

src/components/UpcomingEventsList.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import InlineLink from "@/components/Link"
1111

1212
import { trackCustomEvent } from "@/lib/utils/matomo"
1313

14-
import communityConferences from "@/data/community-events"
14+
import communityEvents from "@/data/community-events.json"
1515

1616
type OrderedUpcomingEvent = CommunityConference & {
1717
date: string
@@ -37,7 +37,7 @@ const UpcomingEventsList = () => {
3737
}
3838

3939
useEffect(() => {
40-
const eventsList: CommunityConference[] = [...communityConferences]
40+
const eventsList = communityEvents as CommunityConference[]
4141
const yesterday = new Date()
4242
yesterday.setDate(yesterday.getDate() - 1)
4343

src/data/community-events.json

Lines changed: 548 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)