Adrian Short 0869800b01 | 5 лет назад | |
---|---|---|
bin | 6 лет назад | |
lib | 6 лет назад | |
public | 6 лет назад | |
views | 6 лет назад | |
.gitignore | 6 лет назад | |
Gemfile | 6 лет назад | |
Gemfile.lock | 6 лет назад | |
README.md | 6 лет назад | |
media.csv | 5 лет назад | |
netlify.toml | 6 лет назад |
Static site generator for website to track BT InLink kiosks planning applications.
$ git clone git@github.com:adrianshort/kiosks.git && cd kiosks
$ bundle install
$ export MORPH_API_KEY=123456abcdef
(use the actual key value given)Add the MORPH_API_KEY
to your .profile
or .bash_profile
file or similar as required so it’s available for every shell session.
$ bundle exec bin/download
- gets the latest data from the scraper’s API$ bundle exec bin/petrify
- builds the static siteThe built site is now in the _site
directory.
If you’ve got build/deploy to Netlify set up (see below), use [skip ci]
in your commit messages to avoid triggering a build every time you git push
.
Use Morph to send a webhook HTTP POST request to Netlify, triggering Netlify to build and deploy the site using the latest version of the data.
New site from Git
adrianshort/kiosks
repo to deploy, or your own fork of it.master
, build command: bundle exec bin/download && bundle exec bin/petrify
, publish directory: _site
Show advanced
and create a New variable
MORPH_API_KEY
, Value: 123456abcdef
(use the actual key value given by Morph)Deploy
. Netlify will now build and deploy the site.Site settings
for your Netlify site.Build & deploy
tab > Continuous Deployment
Add build hook
.Build hook name
can be anything you like, eg Morph scrape completed
.Branch to build
is master
.Save
.https://api.netlify.com/build_hooks/123456abcdef
.Add webhook
.Update Settings
.Netlify will now build and deploy the site using the latest scraper data every time the Morph scrape succeeds.