Skip to content

Latest commit

 

History

History
38 lines (21 loc) · 2.67 KB

README.md

File metadata and controls

38 lines (21 loc) · 2.67 KB

diagram

The page(s) are generated every five minutes by a Cloud Function which uploads the result to a public Cloud Storage Bucket whose contents are served by Cloudflare. Each build uses the contents of .config to build a GraphQL query for the GitHub API. This data is then used to execute the website templates and build the static output files.

This process means the website contents, like user icon and repo descriptions, will always be up-to-date, without impacting response time. It also makes it easy, fast and version-controlled to update the list of projects and contributions shown on the website.

Development

$ go run ./development/build.go

This command will output index.html in the project root and uses the local .config to fetch for data.

After the initial build, the ./templates directory is watched for changes. Manual rebuilds can be triggered by typing .\n.

If a .env file exists in the project root, it will automatically be loaded.

The GRAPHQL_TOKEN environment variable must be defined to access the GitHub API.

Deployment

To publish Go dependency changes outside the ./functions directory, commit/push the changes and run ./scripts/update-function-deps.sh.

This project's resources are all managed using Terraform. Any change to the main branch will automatically be applied (using Cloud Build). However, some initial manual setup is required:

As of this writing (Nov 2018)

License

MIT