Skip to content

Commit

Permalink
Create data
Browse files Browse the repository at this point in the history
  • Loading branch information
keichan34 committed Sep 26, 2024
1 parent 2f8dc82 commit de20da4
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
40 changes: 40 additions & 0 deletions .github/workflows/create-data.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Create Data

on:
# TODO: Run this workflow every month
# schedule:
# - cron: '0 0 * * *'
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'

- name: Cache
uses: actions/cache@v4
with:
key: 'v1'
path: cache

- name: Install dependencies
run: npm ci

- name: Create all data
run: npm run run:all

- name: Deploy to R2
env:
AWS_ACCESS_KEY_ID: ${{ vars.R2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
R2_ENDPOINT: ${{ vars.R2_ENDPOINT }}
run: |
aws s3 sync --region="auto" --endpoint="$R2_ENDPOINT" ./out/ s3://japanese-addresses-v2/
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"build:proto": "protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_out=. ./src/address_data.proto",
"build": "tsc",
"clear:cache": "shx rm -rf ./cache",
"run": "npm run run:01_make_prefecture_city && npm run run:02_make_machi_aza && npm run run:03_make_rsdt && npm run run:04_make_chiban",
"run:all": "npm run run:01_make_prefecture_city && npm run run:02_make_machi_aza && npm run run:03_make_rsdt && npm run run:04_make_chiban",
"run:01_make_prefecture_city": "tsx ./src/01_make_prefecture_city.ts",
"run:02_make_machi_aza": "tsx ./src/02_make_machi_aza.ts",
"run:03_make_rsdt": "tsx ./src/03_make_rsdt.ts",
Expand Down

0 comments on commit de20da4

Please sign in to comment.