Govdirectory is a static site, meaning that all files are generated pre-deployment. Govdirectory is generated using Snowman and its build
command. Using the build command generates a site
directory. This folder contains all files necessary for the govdirectory.org website.
Govdirectory is currently published using GitHub Pages and its source is the gh-pages
branch in this repository. To deploy the site:
- Checkout the
gh-pages
. - Delete all the contents of that branch(if your are using your file manager, skip
.git
) - Copy all the contents of the
site
directory you want to deploy into thegh-pages
branch. - Commit all files and changes.
- Push your commit to origin.
GitHub will now automatically deploy the site. It might take a while for the changes to go into effect.
By default Snowman caches all data from the used SPARQL endpoint. therefore, to update data one needs to clear the cache(snowman cache --invalidate
). However, for a large site like Govdirectory we often want to update only partial parts of the site to decrease to load on the SPARQL endpoint and to decrease build times.
Govdirectory contains a helper script to clear the cache for all agencies under a given country. The country argument should match the "safe-name" of the intended query.
./scripts/invalidate-social-media-country.sh sweden
Sometimes you might need to only clear the cache for a specific query. How to do this is described in the Snowman documentation.