c061aef8d9
We aren't including git commit info in doc pages anymore so we don't need special handling for .git for Cloud Build anymore. |
||
---|---|---|
archetypes | ||
assets | ||
cloudbuild | ||
cmd/gvisor-website | ||
content | ||
layouts | ||
static/favicons | ||
themes/docsy | ||
.gcloudignore | ||
.gitignore | ||
CODEOWNERS | ||
CONTRIBUTING.md | ||
LICENSE | ||
Makefile | ||
README.md | ||
cloudbuild.yaml | ||
config.toml | ||
package-lock.json | ||
package.json |
README.md
gVisor Website
This repository holds the content for the gVisor website. It uses hugo to generate the website and Docsy as the theme.
Requirements
Building the website requires the extended version of hugo and node.js in order to generate CSS files. Please install them before building.
- Node.js >= 10.15.0 LTS
- hugo extended >= v0.53
Building
Build the website using make
:
make
This will output the App Engine application code, configuration, and html and
CSS into the public/
directory.
Testing
You can use the hugo web server for testing. This will start a webserver that will rebuild the site when you make content changes:
make server
Access the site at http://localhost:8080
Deploy
Deploying the website to App Engine requires gcloud. First create a configuration:
{
gcloud config configurations create gvisor-website
gcloud config set project gvisor-website
}
Deploy the application:
make deploy
Editing documentation
Documentation is located in the content/docs/ directory. Documentation is written in markdown with hugo extensions. Please read more about content management in the hugo documentation.
Submit a Build
Normally a build is triggered when you push to the gvisor-website repository. However, you can submit a build to Cloud Build manually.
As one-time setup, enable the App Engine Admin API, and set IAM roles for the Cloud Build service account.
{
PROJECT_NUMBER=$(gcloud projects list --filter=projectId:gvisor-website --format="value(projectNumber)")
gcloud services enable appengine.googleapis.com
gcloud projects add-iam-policy-binding gvisor-website \
--member=serviceAccount:${PROJECT_NUMBER}@cloudbuild.gserviceaccount.com \
--role='roles/appengine.deployer'
gcloud projects add-iam-policy-binding gvisor-website \
--member=serviceAccount:${PROJECT_NUMBER}@cloudbuild.gserviceaccount.com \
--role='roles/appengine.serviceAdmin'
}
Submit the build.
make cloud-build