Including python process to scraping latest data on build, add netlify.toml
at root to override netlify setting.
[build]
command = "python get_hkgeo-data.py && npm run build"
publish = "build"
[context.production]
environment = { PYTHON_VERSION = "3.8" }
-
Create
Build hooks
netlify site setting, then you will have a post url link for trigger build.Settings > Build & Deploy > Continuous Deployment > Build hooks
-
Create daily webhook job at https://ifttt.com/
Reference : https://answers.netlify.com/t/scheduling-builds-and-deploys-with-netlify/2563/9
Get geojson from https://geodata.gov.hk/
Simply use case, just run python script for scraping geojson files to /static/json
python get_hkgeo-data.py
Web using SvelteKit to bulid
# install package
npm install
# local test
npm run dev