Garret Kelly | cb74aff | 2019-10-21 14:53:09 -0400 | [diff] [blame] | 1 | # Site Infrastructure |
| 2 | This directory contains the scripts and configuration required to update the [opentitan.org][ot] public-facing website. |
| 3 | |
| 4 | # Dependencies |
| 5 | These scripts require that you have [hugo][install-hugo] and [gcloud][install-gcloud] installed and that your gcloud is configured with the correct GCP project. |
| 6 | The production site project can be selected with: |
| 7 | |
| 8 | ``` |
| 9 | gcloud config set project gold-hybrid-255313 |
| 10 | ``` |
| 11 | |
| 12 | # Serving Locally |
| 13 | To serve the site locally run the `serve.sh` script, which will build and serve the site on [localhost:1313](http://localhost:1313), automatically rebuilding pages when they are changed. |
| 14 | |
| 15 | # Deploying |
| 16 | To deploy the site use the `deploy.sh` script. |
| 17 | Specify the environment (either `public` or `staging`) as the first argument to choose between the two environments. |
| 18 | The script takes care of flushing the CDN cache to make sure changes are visible as quickly as possible. |
| 19 | |
| 20 | [install-gcloud]: https://cloud.google.com/sdk/install |
| 21 | [install-hugo]: https://github.com/gohugoio/hugo#choose-how-to-install |
| 22 | [ot]: https://opentitan.org |