Skip to content

Commit

Permalink
Merge pull request #12463 from wslyvh/dev
Browse files Browse the repository at this point in the history
Import from ethereum events sheet
  • Loading branch information
wackerow authored Mar 22, 2024
2 parents 9b66046 + 2e5f11b commit dce32b8
Show file tree
Hide file tree
Showing 8 changed files with 736 additions and 392 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/import-community-events.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Import community events

on:
schedule:
- cron: "0 0 * * SUN" # Runs every Sunday at midnight
workflow_dispatch:

jobs:
create_pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v3
with:
node-version: 18
- run: yarn install
- run: yarn events-import
env:
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
- uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
message: "Update community events"
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"chromatic": "chromatic --project-token fee8e66c9916",
"crowdin-clean": "rm -rf .crowdin && mkdir .crowdin",
"crowdin-import": "ts-node src/scripts/crowdin-import.ts",
"events-import": "ts-node -O '{ \"module\": \"commonjs\" }' src/scripts/events-import.ts",
"markdown-checker": "ts-node -O '{ \"module\": \"commonjs\" }' src/scripts/markdownChecker.ts"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions src/components/UpcomingEventsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import InlineLink from "@/components/Link"

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

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

type OrderedUpcomingEvent = CommunityConference & {
date: string
Expand All @@ -37,7 +37,7 @@ const UpcomingEventsList = () => {
}

useEffect(() => {
const eventsList: CommunityConference[] = [...communityConferences]
const eventsList = communityEvents as CommunityConference[]
const yesterday = new Date()
yesterday.setDate(yesterday.getDate() - 1)

Expand Down
548 changes: 548 additions & 0 deletions src/data/community-events.json

Large diffs are not rendered by default.

Loading

0 comments on commit dce32b8

Please sign in to comment.