Serve static files directly from git repos
GIT_TOKEN
:- A token in the form
host:token
for examplegithub.com:1234
- A token in the form
FS_TYPE
:- File system type, one of
os
,memory
, orgcs
- File system type, one of
GCS_BUCKET
:- The bucket name that objects should be cached to, or the cache file if FS_TYPE not
gcs
- The bucket name that objects should be cached to, or the cache file if FS_TYPE not
BASE
:- The base for the files to be fetched, can be
github.com/myorg
orgithub.com
for example- if
github.com/myorg
, the url for the website will be<host>/repo/path
- if
github.com
, the url for the website will be<host>org/repo/path
- if
- The base for the files to be fetched, can be
- Rate limiting will occur with github api tokens (eventually), because of this you can choose to cache assets in a GCS bucket by setting the
GCS_BUCKET
environment variable - To remove cache (could be a ci step), you can request to delete a path:
curl --location --request DELETE 'http:https://<host>/<resource>/'
- This will delete from gcs cache so the next request of
resource
will be a fresh fetch from github
- deployed to google cloud functions,
BASE=github.com/joshcarp
, deployed athttps://us-central1-gopper.cloudfunctions.net/docs
pointing at this README