This repository was archived by the owner on Apr 20, 2022. It is now read-only.
File tree 3 files changed +5
-5
lines changed
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
- PORT = # Port to be used by the app
2
1
GOOGLE_API_KEY = # Google Maps API KEY
Original file line number Diff line number Diff line change 9
9
steps :
10
10
- uses : actions/checkout@v2
11
11
- uses : actions/setup-node@v1
12
- - run : npm install
13
- - run : npm run geocode
12
+ - run : npm install; npm run geocode
13
+ env :
14
+ GOOGLE_API_KEY : ${{ secrets.GOOGLE_API_KEY }}
14
15
- uses : stefanzweifel/git-auto-commit-action@v4
15
16
with :
16
17
commit_message : Geocoded newly added addresses
Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ const getNewLocations = () => {
14
14
fs . promises . readFile ( LOCATIONS_PATH ) ,
15
15
fs . promises . readFile ( COORDINATES_PATH )
16
16
] ) . then ( ( [ locations , coordinates ] ) => {
17
- const locationLength = String ( locations ) . split ( "\n" ) . length ;
18
- const coordinateLength = String ( coordinates ) . split ( "\n" ) . length ;
17
+ const locationLength = String ( locations ) . replace ( / \n + $ / , "" ) . split ( "\n" ) . length ;
18
+ const coordinateLength = String ( coordinates ) . replace ( / \n + $ / , "" ) . split ( "\n" ) . length ;
19
19
console . log ( { locationLength, coordinateLength} ) ;
20
20
return String ( locations ) . split ( "\n" ) . slice ( coordinateLength ) ;
21
21
} ) ;
You can’t perform that action at this time.
0 commit comments