File tree Expand file tree Collapse file tree 8 files changed +736
-392
lines changed Expand file tree Collapse file tree 8 files changed +736
-392
lines changed Original file line number Diff line number Diff line change
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"
Original file line number Diff line number Diff line change 17
17
"chromatic" : " chromatic --project-token fee8e66c9916" ,
18
18
"crowdin-clean" : " rm -rf .crowdin && mkdir .crowdin" ,
19
19
"crowdin-import" : " ts-node src/scripts/crowdin-import.ts" ,
20
+ "events-import" : " ts-node -O '{ \" module\" : \" commonjs\" }' src/scripts/events-import.ts" ,
20
21
"markdown-checker" : " ts-node -O '{ \" module\" : \" commonjs\" }' src/scripts/markdownChecker.ts"
21
22
},
22
23
"dependencies" : {
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import InlineLink from "@/components/Link"
11
11
12
12
import { trackCustomEvent } from "@/lib/utils/matomo"
13
13
14
- import communityConferences from "@/data/community-events"
14
+ import communityEvents from "@/data/community-events.json "
15
15
16
16
type OrderedUpcomingEvent = CommunityConference & {
17
17
date : string
@@ -37,7 +37,7 @@ const UpcomingEventsList = () => {
37
37
}
38
38
39
39
useEffect ( ( ) => {
40
- const eventsList : CommunityConference [ ] = [ ... communityConferences ]
40
+ const eventsList = communityEvents as CommunityConference [ ]
41
41
const yesterday = new Date ( )
42
42
yesterday . setDate ( yesterday . getDate ( ) - 1 )
43
43
Load Diff Large diffs are not rendered by default.
You can’t perform that action at this time.
0 commit comments