Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import from ethereum events sheet #12463

Merged
merged 10 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading