g-harel / website

personal website generator running in the cloud

Home Page:https://g.harel.page

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

diagram

g.harel.page

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 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 master branch will automatically be applied (using Cloud Build). However, some initial manual setup is required:

As of this writing (Nov 2018)

License

MIT

About

personal website generator running in the cloud

https://g.harel.page

License:MIT License


Languages

Language:Go 46.4%Language:HTML 38.9%Language:HCL 12.6%Language:Shell 2.1%