Skip to content

Commit

Permalink
create-data.yml 調整
Browse files Browse the repository at this point in the history
  • Loading branch information
keichan34 committed Dec 25, 2024
1 parent 9c2a16f commit a1b146a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/create-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@ jobs:
run: |
./deploy/01_sync_to_s3.sh
- name: Create archive
run: |
./deploy/01a_create_archive.sh
- name: Upload archive to S3
run: |
aws s3 cp \
./out/api.tar.zst s3://japanese-addresses-v2.geoloniamaps.com/experimental/api.tar.zst
clear-cdn-cache:
needs:
- create-data
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,17 @@ $ npm run run:03_make_rsdt # 住居表示住所API作成 (町字APIが先に作
$ npm run run:04_make_chiban # 地番住所API作成 (町字APIが先に作らないとエラーになります)
```

TARファイルに丸める場合は

```shell
VERSION="$(date -u '+%4Y%m%d%H%M%S')"
cd ./out
tar -cf "api-$VERSION.tar" ./api
zstd -T0 -19 -z "api-$VERSION.tar"
```

`deploy/01a_create_archive.sh` を参照してください

### API の構成

```shell
Expand Down
5 changes: 5 additions & 0 deletions deploy/01a_create_archive.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash -e

cd "$(dirname "$0")"/../out
tar -cf "api.tar" ./api
zstd -T0 -19 --rm -z "api.tar"

0 comments on commit a1b146a

Please sign in to comment.